cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Template

Former Member
0 Kudos

Hi,

I am trying to create a workflow from scratch. In the SAP Souring guide document it is recommended to start from templates., but I could not find any template.

Can someone please send me the URL or template of workflow which I can use as start point?

"SAP recommends that you use the templates provided as the basis for workflows, as opposed to creating new ones".

Thanks and Regards,

Yogesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Yogesh,

Yes, its true that you should not create the Workflow from scrath.You can take the templates from the existing patterns available in the XPDL.

Thanks,

Ankur Goyal

Edited by: ankur_goyal03 on Sep 27, 2011 9:32 AM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Yogesh,

U have mentioned some SAP Sourcing guide, if I am not mistaken then are you talikng about some document to help start with the Workflow template ? Can you let me know from where did you got this document??

Thanks,

rythm

Former Member
0 Kudos

Guys,

I have got some templates with me, If you want I cans end it to you in email. Or try copying below XML and save it as .xpdl file.

NOTE: This file will work only in together 2.1 version

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<Package xmlns="http://www.wfmc.org/2002/XPDL1.0" xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="fci_basic_approval" Name="FCI Basic Workflow" xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd">;

<PackageHeader>

<XPDLVersion>1.0</XPDLVersion>

<Vendor>Together</Vendor>

<Created>2005-07-07 12:38:32</Created>

</PackageHeader>

<RedefinableHeader PublicationStatus="UNDER_TEST"/>

<ConformanceClass GraphConformance="NON_BLOCKED"/>

<WorkflowProcesses>

<WorkflowProcess AccessLevel="PUBLIC" Id="approval_process" Name="Hierarchical Approval Process">

<ProcessHeader DurationUnit="D">

<Created>2005-07-07 12:46:43</Created>

<Description>This is a basic 3 step approval process</Description>

</ProcessHeader>

<RedefinableHeader PublicationStatus="UNDER_TEST"/>

<Participants>

<Participant Id="process_owner" Name="Process Owner">

<ParticipantType Type="ROLE"/>

<Description>The owner of the workflow process</Description>

</Participant>

<Participant Id="approvers" Name="Approvers">

<ParticipantType Type="ROLE"/>

</Participant>

<Participant Id="workflow_engine" Name="Workflow Engine">

<ParticipantType Type="ROLE"/>

</Participant>

</Participants>

<ActivitySets>

<ActivitySet Id="approval_process_Ase1">

<Activities>

<Activity Id="send_email_to_approvers" Name="Send Email to Approvers">

<Implementation>

<No/>

</Implementation>

<Performer>workflow_engine</Performer>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

</Activity>

</Activities>

</ActivitySet>

</ActivitySets>

<Activities>

<Activity Id="approval_gate_1" Name="Org.Approval">

<Implementation>

<No/>

</Implementation>

<Performer>approvers</Performer>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

<TransitionRestrictions>

<TransitionRestriction>

<Split Type="XOR">

<TransitionRefs>

<TransitionRef Id="trans_level1_to_level2"/>

<TransitionRef Id="trans_level1_to_notify"/>

</TransitionRefs>

</Split>

</TransitionRestriction>

</TransitionRestrictions>

<ExtendedAttributes>

<ExtendedAttribute Name="LocalizedDescription" Value="workflow$workflow.simple_approval"/>

<ExtendedAttribute Name="Prescript" Value="// Initialize the approver list&#10;// Send Notifications"/>

<ExtendedAttribute Name="ApprovalActivity" Value="TRUE"/>

<ExtendedAttribute Name="Duration" Value="7"/>

<ExtendedAttribute Name="DurationUnit" Value="D"/>

<ExtendedAttribute Name="LocalizedInstructions" Value="workflow$workflow.gate1.instructions"/>

</ExtendedAttributes>

</Activity>

<Activity Id="approval_gate_2" Name="Org.Approval">

<Implementation>

<No/>

</Implementation>

<Performer>approvers</Performer>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

<TransitionRestrictions>

<TransitionRestriction>

<Split Type="XOR">

<TransitionRefs>

<TransitionRef Id="trans_level2_to_level3"/>

<TransitionRef Id="trans_level2_to_notify"/>

</TransitionRefs>

</Split>

</TransitionRestriction>

</TransitionRestrictions>

<ExtendedAttributes>

<ExtendedAttribute Name="LocalizedDescription" Value="workflow$workflow.simple_approval"/>

<ExtendedAttribute Name="Prescript" Value="import com.sap.odp.api.doc.collaboration.;&#10;import com.sap.odp.api.doccommon.masterdata.;&#10;import com.sap.odp.api.doccommon.doc.contract.*;&#10;&#10;// First, get the estimated price. If not set, then do nothing&#10;PriceIfc estimated = (PriceIfc)doc.getExtensionField(&quot;estimated_value&quot;).get();&#10;if(!estimated.isSet())&#10; return;&#10;&#10;ContractDocumentTypeIBeanHomeIfc home = (ContractDocumentTypeIBeanHomeIfc) &#10;IBeanHomeLocator.lookup(session, ContractDocumentTypeIBeanHomeIfc.sHOME_NAME);&#10;&#10;ContractDocumentTypeIBeanIfc docType = (ContractDocumentTypeIBeanIfc) &#10;home.find(doc.getDocTypeReference());&#10;&#10;IBeanHomeIfc beanHome = doc.getIBeanHomeIfc();&#10;&#10;ExtensionCollectionIfc approvers = docType.getExtensionCollection(&quot;approval_hierarchy&quot;);&#10;Iterator iter = approvers.iterator();&#10;while(iter.hasNext())&#10;{&#10; ExtensionCollectionMemberIfc rule = (ExtensionCollectionMemberIfc) iter.next();&#10; PriceIfc min_value = (PriceIfc) rule.get(&quot;min_estimated_val&quot;);&#10; PriceIfc max_value = (PriceIfc) rule.get(&quot;max_estimated_val&quot;);&#10; ObjectReferenceIfc user = (ObjectReferenceIfc) rule.get(&quot;approver_user&quot;);&#10; ObjectReferenceIfc group = (ObjectReferenceIfc) rule.get(&quot;approver_group&quot;);&#10; String approval_activity = (String) rule.get(&quot;approval_activity&quot;);&#10; &#10; if(approval_activity != null &amp;&amp; nativeName != null)&#10; {&#10; if(!approval_activity.equals(nativeName))&#10; {&#10; continue;&#10; }&#10; }&#10;&#10; // Check if the estimated price is in range&#10; if(min_value.compareTo(estimated) &lt;= 0)&#10; {&#10; if(!max_value.isSet() || estimated.compareTo(max_value) &lt;= 0)&#10; {&#10; ObjectReferenceIfc principal;&#10; if(user.isSet())&#10; principal = user;&#10; else&#10; principal = group;&#10; &#10; addApprover(principal);&#10; }&#10; }&#10;}"/>

<ExtendedAttribute Name="ApprovalActivity" Value="TRUE"/>

<ExtendedAttribute Name="Duration" Value="7"/>

<ExtendedAttribute Name="DurationUnit" Value="D"/>

<ExtendedAttribute Name="LocalizedInstructions" Value="workflow$workflow.gate2.instructions"/>

</ExtendedAttributes>

</Activity>

<Activity Id="approval_gate_3" Name="Org.Approval">

<Implementation>

<No/>

</Implementation>

<Performer>approvers</Performer>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

<ExtendedAttributes>

<ExtendedAttribute Name="LocalizedDescription" Value="workflow$workflow.simple_approval"/>

<ExtendedAttribute Name="Prescript" Value="// Initialize the approver list&#10;// Send Notifications"/>

<ExtendedAttribute Name="ApprovalActivity" Value="TRUE"/>

<ExtendedAttribute Name="Duration" Value="7"/>

<ExtendedAttribute Name="DurationUnit" Value="D"/>

<ExtendedAttribute Name="LocalizedInstructions" Value="workflow$workflow.gate3.instructions"/>

</ExtendedAttributes>

</Activity>

<Activity Id="send_notification" Name="Send Notification">

<BlockActivity BlockId="approval_process_Ase1"/>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

<TransitionRestrictions>

<TransitionRestriction>

<Join Type="XOR"/>

</TransitionRestriction>

</TransitionRestrictions>

<ExtendedAttributes>

<ExtendedAttribute Name="Postscript" Value="import com.sap.odp.api.doccommon.doc.contract.*;&#10;if(getApprovalStatus() != DENIED)&#10;{&#10; ContractDocumentIBeanIfc contract = (ContractDocumentIBeanIfc)doc;&#10; ContractDocumentIBeanHomeIfc home = (ContractDocumentIBeanHomeIfc)&#10; IBeanHomeLocator.lookup(session, ContractDocumentIBeanHomeIfc.sHOME_NAME);&#10;}"/>

</ExtendedAttributes>

</Activity>

</Activities>

<Transitions>

<Transition From="approval_gate_1" Id="trans_level1_to_level2" To="approval_gate_2">

<Condition Type="CONDITION">getApprovalStatus() == APPROVED</Condition>

</Transition>

<Transition From="approval_gate_2" Id="trans_level2_to_level3" To="approval_gate_3">

<Condition Type="CONDITION">getApprovalStatus() == APPROVED</Condition>

</Transition>

<Transition From="approval_gate_3" Id="trans_level3_to_notify" To="send_notification">

<Condition Type="CONDITION">getApprovalStatus() != PENDING</Condition>

</Transition>

<Transition From="approval_gate_1" Id="trans_level1_to_notify" To="send_notification">

<Condition Type="CONDITION">getApprovalStatus() == DENIED</Condition>

</Transition>

<Transition From="approval_gate_2" Id="trans_level2_to_notify" To="send_notification">

<Condition Type="CONDITION">getApprovalStatus() == DENIED</Condition>

</Transition>

</Transitions>

</WorkflowProcess>

</WorkflowProcesses>

</Package>

Former Member
0 Kudos

I can see that, xml I pasted in my earlier message do not appear correctly in the message. Alternative is, GRAB it from the 'HTML Source of this page'. I just checked, the xpdl appears correctly in the HTML source code.

Regards,

Yogesh

Former Member
0 Kudos

Some templates you can find in  together workflow editor when you install it. Also the manual is handy.

Former Member
0 Kudos

Hi Guys,

I'm also looking for the template. How can i find those templates to create the XPDL for SAP sourcing workflow.

Former Member
0 Kudos

Hi Noppong

You can get the patterns available for the sequence workflow in the XPDL OR ask some one to send you one XPDL workflow.

Thanks,

Ankur GOyal

Edited by: Ankurgoyal03 on Nov 18, 2011 10:46 AM