Skip to Content
Author's profile photo Murali Krishna

Condition to start a workitem

Friends….

  We can put conditions to create the workitem, after creation of the workitem and after execution of the workitem.

(We can use Condition step type to validate the technical functions). (If you are not familiar with Standard task creation, check the below link

  http://scn.sap.com/blogs/anomitroguha/2012/04/11/part-3-creation-of-a-workflow-standard-task-and-binding-of-rule ).

‘Conditions’ tab in ‘Activity’ step type will perform the different types of conditions on workitems, like before starting of a workitem.

img 1.png

We have 3 types of conditions.

  1. Create workitem: When a workitem was generated, it will check the respective condition was satisfied or not? At that time the workitem status is “IN PREPARATION”, the workitem is not accessible anywhere.
  2. Complete Workitem: In this case, workitem will be generated, but it will not complete until the condition is true. The workitem will not complete until the condition evaluates to true.
  3. Complete Execution: After execution of the workitem, the condition will be evaluated and if it is true then only the workitem will complete.

Step 1:

Create a workflow container element and make it as import as mentioned below.

img 2.png

Step 2:

I have created a Task with the following details.

img 3.png

Save the task.

  1. Maintain the task as ‘General Task’ as mentioned below. Menu options –> Additional data–> Agent assignment–> Maintain.

Select the task and click on ‘Attributes’ button. Select ‘General Task’ radio button and click on ‘Transfer’.

img 4.png

Come back from the screen. Enter some text in the Task Description

img 5.png

  1. Save task & come back. Maintain possible Binding from Workflow to Task and vice versa.

In the ‘Agents’ tab of activity step, select ‘User’ and any user name as mentioned below.

img 6.png

Go to ‘condition’ tab in the activity step. We can observe three types of conditions in the screen.

  1. Create workitem
  2. Complete workitem
  3. Complete execution

img 7.png

Open ‘create work item’ tab to create a condition, if this condition is true then only workitem will create.

Click on ‘click here to create a new condition’ sentence to create the condition.

Enter the following condition

img 8.png

Note: We know the condition is false, for this step workitem will not create until the condition is true.

We can find a symbol in the ‘conditions’ tab as mentioned below.

img 9.png

Save, activate and execute the workflow. Provide element WI_Elem value as ‘5’ and execute.

img 10.png

It will show the agent name in the ActiveX version log but unfortunately the workitem will not be available in agent inbox. Scroll down to check user inbox.

img 11.png

In the technical details of log, we can observe a different symbol at the step and in ‘Message’ tab message text as ‘Execution Interrupted’.

img 12.png

Go and check in the agent inbox. There is no workitem from our workflow.

img 13.png

In the execution time of our workflow, if I provide the element WI_Elem value as 10, it will works fine.

img 14.png

img 15.png

After workitem execution the workflow log appears as usual.

ENJOY WORKFLOWS…..

Regards,

Murali Krishna.

Assigned tags

      22 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Balajee Putta
      Balajee Putta

      Dear Murali

      Execellent Document

      Author's profile photo Modak Gupta
      Modak Gupta

      Hey Murali

      Good one!

      I have book marked it to provide this as an answer to various dicussions where people want specific checks before or after step executions and not allow to proceed further.

      Be prepared for a lot of likes 😉

      regards,

      Modak

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thank you Modak Gupta

      With your motivation I will try to post some more documents ...

      Regards,

      Murali Krishna.

      Author's profile photo Anjan Paul
      Anjan Paul

      Nice doumentation Maurali

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thanks Dear Anjan Paul ,

      Regards,

      Murali Krishna.

      Author's profile photo Former Member
      Former Member

      Informative........

      Author's profile photo Former Member
      Former Member

      Nice one Murali.

      Regards,

      Raju K. Rao

      Author's profile photo Former Member
      Former Member

      Great Job Murali, i'm expecting More Documents... 🙂

      Author's profile photo Former Member
      Former Member

      Its very useful 🙂 🙂 🙂

      Author's profile photo Mahesh kumar
      Mahesh kumar

      Excelent Mr murali & its very usefull .

      Regards,

      Mahesh 🙂

      Author's profile photo Former Member
      Former Member

      usefull info Murali.

      Regards,

      Rajakala.

      Author's profile photo Former Member
      Former Member

      Nice doc. and worth reading....

      Can you explain the real time difference between  Complete Workitem and Complete Execution options? also with some realtime exampls of thier usage.

      Regards,

      Ibrahim

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Hi ibrahim,

      I am just digging the workflow (every step types & etc ) and came to know that conditions tab. I haven't worked on that particular requirement. I will update you surely if I got any inputs for the same,

      Thanks.

      Regards,

      Murali Krishna.

      Author's profile photo Former Member
      Former Member

      Nice document murali

      Author's profile photo Former Member
      Former Member

      Excellent Document Murali......will be waiting for more doc's like this. Keep BLOGGING!!!

      Regards,

      Mohsin.

      Author's profile photo Gaurang Gujar
      Gaurang Gujar

      Hi Murali,

      Thanks a lot for the wonderful Blog and sharing your Knowledge.

      It would be great if you can add the real workflow scenario's where conditions can be used.

      Regards,

      Gaurang

      Author's profile photo Former Member
      Former Member

      Hi Murali,

      Thanks a lot for the wonderful Blog and sharing your Knowledge.


      Author's profile photo Former Member
      Former Member

      Thanks for innovative document Murali.

      Regards,

      Pavan A

      Author's profile photo Former Member
      Former Member

      Knowledge Sharing Document ....

      Best Regards,

      Haritha....

      Author's profile photo Former Member
      Former Member

      Hi Murali

      Nice document...Thanks for sharing

      Author's profile photo Former Member
      Former Member

      Nice document Murali !!!

      Author's profile photo Sri Hari Anand Kumar
      Sri Hari Anand Kumar

      Good document with clear step by step procedures..... Good Work Murali 🙂 🙂