If Else Activity
To write an IF/Else condition follow the steps below:
1. From the design section, as mentioned before in "Designing a Workflow," drag the IfElseActivity from the toolbox and place it under an event after which you want to have an IF/Else condition as shown below:
2. Click on ifElseActivity1 and provide the Name, Description, and value for Enabled from the Properties window.
3. Click on the left hand side of the "IfElse" branch activity as shown below by an arrow and select "Declarative Rule Condition" or "Code Condition" for the Condition Field under the Properties window.
For "Declarative Rule Condition":
1. Expand the "Condition" tree in the Properties window and provide a "ConditionName" by clicking on the button as shown below by an arrow:
2. The Select Condition dialog box will open. Click on New option.
3. The Rule Condition Editor dialog box will open, type in the Condition and click on OK button.
The word that is highlighted in the above image in the "Rule Condition Editor" can be a Profile Field of the current Document Type or it can be a PaperSave Variable.
4. Drag any of the State Activity under that Condition as shown below:
Click on image to view magnify and shrink print screen.
5. Repeat steps 5 and 6 for the ifElse condition.
If "Code Condition" is selected as the Condition Type, then you need to write the code you want to be evaluated in the Condition box and then add a State Activity under that condition.
You can also use the profile fields by using the following syntax:
if(profile.number_textbox > 0)
profile.date_datebox = '12/12/2012';
profile.date_datebox = '11/11/2011';