cancel
Showing results for 
Search instead for 
Did you mean: 

CLM Workflow

Former Member
0 Kudos

Hello Experts,

I need your help to configure the SAP E-sourcing /CLM workflow. Right Now I am having the Together workflow editor tool and I have read the article that SAP recommends to use Workflow templates instead of creating a new one. But i am not able to find the templates at anywhere. So Kindly share me the templates and guide me step by step process for creating the workflow.

Awating for your response.

Regards,

Mahesh.D

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Vikram,

We are intially planning for 3-step approval CLM workflow. When the contract documents enters into approval phase, the system should pick first approver based on the product category and company code in the MA . Then it sholud check with the total value of the contract ,if it exceeds by 100 USD, it should pick the second approver and finally if it exceeds by 1000 USD, it should pick third approver.

The above scenario is our current requirement.So Please explain me in detail how to configure the above scenario.

Looking for your reply.

Regards,

Mahesh.D

Former Member
0 Kudos

Hi Mahesh Nikam ,

As per your requirement, you can try the code as following in Prescript.

if (value <= 100 ){
	approver = IapiAccountLocator.lookup("1st Approver id");
	addApprover(approver );
}else if (value > 100){
	approver = IapiAccountLocator.lookup("2nd Approver id");
	addApprover(approver );
}else if (value > 1000){
	approver = IapiAccountLocator.lookup("3rd Approver id");
	addApprover(approver );
}

Former Member
0 Kudos

Hello Noppong,

Thanks for the reply. As i am new to CLM workflow part, i am initially planning to implement the below Code which i got from SDN in my system. So Pls tell me step by step procedure in order to implement the below code. Right now, I am having Together workflow editor tool , so pls inform me how to proceed after that .

<?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></div>

</td>

</tr>

</table>

</td>

</tr>

</table>

</div>

</div>

</div>

Former Member
0 Kudos

Hello All,

Complete code is visble in HTML format. So pls Check it and inform me step by step procedure in order to implement that. I have updated my Email Id in my profile. So you can reply me via Email also. I will rewards points for valuable solution.

Thanks.

Former Member
0 Kudos

Hello,

I have a question about check in and check out, Is there some way to unblock check in and check out when the WF is in process?

I would really appreciate because is a big issue that I have.

Thanks in advance

Regards

Former Member
0 Kudos

Hello Vikram,

Thanks for your reply and sorry for late response.

I have read all the documents availiable in the link and i have some few doubts regarding the codes in the documents and uploading in the system . As i'm new to this CLM workflow configuratuion, i need your concrete help regarding this. So Kindly me share your Email id which will be more helpful for me.

Regards,

Mahesh.D

Former Member
0 Kudos

Hi,

Please read the post below for a sample XPDL.

http://forums.sdn.sap.com/thread.jspa?messageID=10828906#10828906

For Scripting and workflow guide you can do the following:

https://websmp209.sap-ag.de/support

Go to Release and Upgrade Info->Installation and Upgrade Guide-> SAP Business Suite Application->SAP Sourcing-> SAP Sourcing 7.0/ 5.1 and download scripting and workflow guide.

Thanks,

Vikram Shukla