on 09-21-2011 11:56 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 // 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.; import com.sap.odp.api.doccommon.masterdata.; import com.sap.odp.api.doccommon.doc.contract.*; // First, get the estimated price. If not set, then do nothing PriceIfc estimated = (PriceIfc)doc.getExtensionField("estimated_value").get(); if(!estimated.isSet()) return; ContractDocumentTypeIBeanHomeIfc home = (ContractDocumentTypeIBeanHomeIfc) IBeanHomeLocator.lookup(session, ContractDocumentTypeIBeanHomeIfc.sHOME_NAME); ContractDocumentTypeIBeanIfc docType = (ContractDocumentTypeIBeanIfc) home.find(doc.getDocTypeReference()); IBeanHomeIfc beanHome = doc.getIBeanHomeIfc(); ExtensionCollectionIfc approvers = docType.getExtensionCollection("approval_hierarchy"); Iterator iter = approvers.iterator(); while(iter.hasNext()) { ExtensionCollectionMemberIfc rule = (ExtensionCollectionMemberIfc) iter.next(); PriceIfc min_value = (PriceIfc) rule.get("min_estimated_val"); PriceIfc max_value = (PriceIfc) rule.get("max_estimated_val"); ObjectReferenceIfc user = (ObjectReferenceIfc) rule.get("approver_user"); ObjectReferenceIfc group = (ObjectReferenceIfc) rule.get("approver_group"); String approval_activity = (String) rule.get("approval_activity"); if(approval_activity != null && nativeName != null) { if(!approval_activity.equals(nativeName)) { continue; } } // Check if the estimated price is in range if(min_value.compareTo(estimated) <= 0) { if(!max_value.isSet() || estimated.compareTo(max_value) <= 0) { ObjectReferenceIfc principal; if(user.isSet()) principal = user; else principal = group; addApprover(principal); } } }"/>
<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 // 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.*; if(getApprovalStatus() != DENIED) { ContractDocumentIBeanIfc contract = (ContractDocumentIBeanIfc)doc; ContractDocumentIBeanHomeIfc home = (ContractDocumentIBeanHomeIfc) IBeanHomeLocator.lookup(session, ContractDocumentIBeanHomeIfc.sHOME_NAME); }"/>
</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>
Hi Guys,
I'm also looking for the template. How can i find those templates to create the XPDL for SAP sourcing workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.