IDM Workflows

Gabriel Magariño, gabriel.magarino@gmail.com, Sun Java System Identity Manager, www.javapassion.com/idm


Gabriel Magariño


Expected duration: 30 minutes (excluding homework)


Prerequisites

This hands-on lab assumes you have minimum programming experience.


Software Needed


Before you begin, you need to install the following software on your computer. 



OS platforms you can use


Change Log

Lab Exercises



Exercise 0: Workflow Using WorkItems Types


                The goal of this exercise is to let you experience about how  the different configuration for a workflow and form using the WorkItem Type parameter.
  1. WorkItem type approval
  2. WorkItem type wizard
  3. WorkItem type suspend

(0.1)WorkItem type approval

  1. Create a new IDM remote project under the folder  C:\IDM\Projects\Lab-008
  2. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.

Scenario Workflow using an activity and with one action that call a Manual Form displaying data. The data were  harcoded just for course purpouse.

We are going to use the workitem type parameter under the call form activity. 
Workflow IDM_COURSE_WFP_WorkItem Types 1   Download
Form IDM_COURSE_FRM_WorkItem Types 1   Download
Subprocess
none
Rule none
Comments
Bold Code
Workflow.

Activity id= 2 Shows the activity used to call  a Form (Call Form ).

itemType define the type that we are using.

WorkitemRequest,WorkItem Requester ,  and WorkItem Description describre the information that should be showed under your approval queue


CODE
Workflow
<!--  MemberObjectGroups="#ID#Top" createDate="Thu Feb 14 19:47:51 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkItem Types 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_WorkItem Types 1' creator='Configurator' createDate='1203040071250' lastModifier='Configurator' lastModDate='1203734563359' lastMod='5' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_WorkItem Types 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='167' y='10'/>
            </Activity>
           
            <Activity id='2' name='Call Form'>
                <ManualAction id='0' timeout='2' itemType='approval'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface</s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Workflow Using  WorkItem Type with approval value</s>
                    </WorkItemDescription>
                    <WorkItemName>
                        <ref>Using TaskDefinition parameters</ref>
                    </WorkItemName>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_WorkItem Types 1'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='106' y='10'/>
            </Activity>

        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>


  1. The image below shows you the structure that your netbeans project should have and which is the parameter that we are going to be modifying for this exercise.



  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflow to execute IDM_COURSE_FRM_WorkItem Types 1
  4. A Task Results Page appears (see the image below)


  1. Once that you executed the workflow, a task instance for that worflow is created and name is generated.
  1. Select the Server Tasks
  2. Select All Tasks
  3. All Tasks page appears (see the image below)


  1. Let's go back to the workflow execution
  2. Select Work Items
  3. Select My Work Items (see image below)
    1. Select the Approvals Options from the list


    1. The Awaiting Approval page appears (see image below)
    2. Select the  your Approval request (IDM Admin Interface). See the image below


  1. Your custom approval page appears(see image below).
  2. Click on the submit button to approve it



  1. The Awaiting Approval page appears (see image below).
  1. Select Server Tasks



  1. Select All task
  2. Due the previously approved proccess (submit button), your taks is completed now(see image below).




(0.2) WorkItem type wizard


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.

Scenario Workflow using an activity and with one action that call a Manual Form displaying data. The data were  harcoded just for course purpouse.

We are going to use the workitem type parameter under the call form activity.
Workflow IDM_COURSE_WFP_WorkItem Types 2   Download
Form IDM_COURSE_FRM_WorkItem Types 2   Download
Subprocess
none
Rule none
Comments
Bold Code
Workflow.

On this exercise we are only changing the itemType from approval to wizard.

Activity id= 2 Shows the activity used to call  a Form (Call Form ).

itemType define the type that we are using.

WorkitemRequest,WorkItem Requester ,  and WorkItem Description describre the information that should be showed under your approval queue


CODE
Workflow
<!--  MemberObjectGroups="#ID#Top" createDate="Thu Feb 14 19:47:51 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkItem Types 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_WorkItem Types 1' creator='Configurator' createDate='1203040071250' lastModifier='Configurator' lastModDate='1203734563359' lastMod='5' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_WorkItem Types 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='167' y='10'/>
            </Activity>
           
            <Activity id='2' name='Call Form'>
                <ManualAction id='0' timeout='2' itemType='wizard'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface</s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Workflow Using  WorkItem Type with approval value</s>
                    </WorkItemDescription>
                    <WorkItemName>
                        <ref>Using TaskDefinition parameters</ref>
                    </WorkItemName>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_WorkItem Types 2'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='106' y='10'/>
            </Activity>

        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>


  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflwo to execute IDM_COURSE_WFP_WorkItem Types 2
  4.  A Task Results Page appears (see the image below)

         

  1. Select Work Items
  2. Select MyWork Items
  3. Your request appears (see image below)
  1. Select the Other request

         

  1. You automatically were pointed to the Other menu tab(see image below)
  2. Select your Request

         

  1. Now your request form appears (see image below).
  2. Click submit button to proceed with  the form approval.

         

  1. At this time your request form was approved, and none taks should appears (see image below).
        


                                                                                                                    return to the top


(0.3)WorkItem type suspend


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.

Scenario Workflow using an activity and with one action that call a Manual Form displaying data. The data were  harcoded just for course purpouse.

We are going to use the workitem type parameter under the call form activity.
Workflow IDM_COURSE_WFP_WorkItem Types 3   Download
Form IDM_COURSE_FRM_WorkItem Types 3    Download 
Subprocess
none
Rule none
Comments
Bold Code
Workflow.

On this exercise we are only changing the itemType from approval to suspend.

Activity id= 2 Shows the activity used to call  a Form (Call Form ).

itemType define the type that we are using.

WorkitemRequest,WorkItem Requester ,  and WorkItem Description describre the information that should be showed under your approval queue


CODE
Workflow
<!--  MemberObjectGroups="#ID#Top" createDate="Thu Feb 14 19:47:51 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkItem Types 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_WorkItem Types 1' creator='Configurator' createDate='1203040071250' lastModifier='Configurator' lastModDate='1203734563359' lastMod='5' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_WorkItem Types 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='167' y='10'/>
            </Activity>
           
            <Activity id='2' name='Call Form'>
                <ManualAction id='0' timeout='2' itemType='suspend'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface</s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Workflow Using  WorkItem Type with approval value</s>
                    </WorkItemDescription>
                    <WorkItemName>
                        <ref>Using TaskDefinition parameters</ref>
                    </WorkItemName>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_WorkItem Types 2'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='106' y='10'/>
            </Activity>

        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>


  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflwo to execute IDM_COURSE_WFP_WorkItem Types 3
  4. A Task Results Page appears (see the image below)

           


  1. Select the Other (see image below).

          

  1. You were pointed to the Other menu tab (see image below)
  2. Select Your request

         

  1. Your request form appears (see image below)
  2. Click on the Submit button

                       

  1.        At this time your request was approved and completed (see the image below) 

         
    

                                                                                                                    return to the top


Exercise 1: Workflow using Transitions


                    The goal of this exercise is to let you experience about how  use the transitions between workflows.
  1.  Using transition between activities

(0.1)Using transitions between activities


    1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.
Scenario Workflow used to show the transition between activities. We are showin a main form with 2 options.
Workflow IDM_COURSE_WFP_Transitions 1                    Download
Form IDM_COURSE_FRM_Transitions 1                     Download
IDM_COURSE_FRM_Choose 1 Transitions 1     Download
IDM_COURSE_FRM_Choose 2 Transitions 1     Download
Subprocess
none
Rule none
Comments
Bold Code
Workflow.

The code below is used to determine the form decision.

<Transition to='Transition 1'>
                    <eq>
                        <ref>formButton</ref>
                        <s>Transition1</s>
                    </eq>
  </Transition>


<ref>formButton</ref>.  Used to read the value from the button.


Form.

<Property name='value' value='Transition1'/> .

Code used to assing a value to the button, this value is read by the Transition to determine


CODE
Workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" createDate="Thu Feb 14 21:08:42 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_Transitions 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_Transitions 1' creator='Configurator' createDate='1203044922343' lastModifier='Configurator' lastModDate='1205205810984' lastMod='17' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='wait' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_Transitions 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='369' y='77'/>
            </Activity>
           
            <Activity id='2' name='Call Form'>
                <ManualAction id='0' timeout='-20' syncExec='true' itemType='wizard'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface </s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Workflow to show  Transitions functionality</s>
                    </WorkItemDescription>
                    <WorkItemName>
                        <ref>Using TaskDefinition parameters</ref>
                    </WorkItemName>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_Transitions 1'/>
                    </FormRef>
                </ManualAction>
               
                <Transition to='Transition 1'>
                    <eq>
                        <ref>formButton</ref>
                        <s>Transition1</s>
                    </eq>
                </Transition>
                <Transition to='Transition 2'>
                    <eq>
                        <ref>formButton</ref>
                        <s>Transition2</s>
                    </eq>
                </Transition>
                <WorkflowEditor x='116' y='145'/>
            </Activity>
           
            <Activity id='3' name='Transition 2'>
                <ManualAction id='0' timeout='-20'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface </s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Form in Transition 2</s>
                    </WorkItemDescription>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_Choose 2 Transitions 1'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='238' y='211'/>
            </Activity>
           
            <Activity id='4' name='Transition 1'>
                <ManualAction id='0' timeout='1'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface </s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Form in transition 1</s>
                    </WorkItemDescription>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_Choose 1 Transitions 1'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='218' y='61'/>
            </Activity>

        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>

Form
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Configuration PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" extensionClass="Form" lastMod="7" lastModifier="Configurator" name="IDM_COURSE_FRM_Transitions 1"-->
<Configuration name='IDM_COURSE_FRM_Transitions 1' creator='Configurator' createDate='1203045045546' lastModifier='Configurator' lastModDate='1205205818828' lastMod='7' wstype='UserForm'>
    <Extension>
        <Form name='IDM_COURSE_FRM_Transitions 1' baseContext='variables' noDefaultButtons='true' objectLocationID='objectType=UserForm&amp;objectName=IDM_COURSE_FRM_Transitions+1&amp;objectPath=0&amp;isBegin=true'>
            <Display class='EditForm'>
                <Property name='title' value='Using Transitions'/>
            </Display>
            <Field name='selectTransitinButtons'>
                <Field name=':complete'>
                    <Expansion>
                        <s>true</s>
                    </Expansion>
                </Field>
                <Field name=':formButton' button='true'>
                    <Display class='Button'>
                        <Property name='label' value='Transition 1'/>
                        <Property name='value' value='Transition1'/>
                        <Property name='command' value='Save'/>
                    </Display>
                </Field>
                <Field name=':formButton' button='true'>
                    <Display class='Button'>
                        <Property name='label' value='Transition 2'/>
                        <Property name='value' value='Transition2'/>
                        <Property name='command' value='Save'/>
                    </Display>
                </Field>
                <Field name='formButton'>
                    <Expansion>
                        <ref>:formButton</ref>
                    </Expansion>
                </Field>
            </Field>
        </Form>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</Configuration>


  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflow to execute  IDM_COURSE_WFP_Transitions 1
  4. A Form  Page appears (see the image below)
  5. Click the Transition 1 button

   

  1. The Transition 1 Form appears (see the image below)
  2. <>Click the Save  Button
  3. Select the Server Tasks
  4. Select Run Tasks
  5. Select the workflow to execute  IDM_COURSE_WFP_Transitions 1
  6. A Form  Page appears
  7. Click the Transition 2 button

   

  1. The Transition 2 Form appears (see the image below)
  2. Click the Save Button to complete the exercise

   


                                                                                                                    return to the top



Exercise 2: Workflow Using TaskDefinition Parameters


                The goal of this exercise is to let you experience about how  the different configuration for a workflow and form using the WorkItem Type parameter.

  1. TaskDefinition Run&Schedule
  2. TaskDefinition  Invisible

(0.1)TaskDefinition Run&Schedule


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.

Senario Workflow using the TaskDefinition parameter. This parameters will be useful to determine the visibility of the workflow.
Workflow IDM_COURSE_WFP_Task Definition Parameter 1   Download
Form IDM_COURSE_FRM_Task Definition Parameter 1    Download
Subprocess
none
Rule none
Comments
Bold Code
Workflow.

visibility='runschedule' .  This value allow to the workflow to be executed in the run and Manage Schedule menu.



CODE
Workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" createDate="Mon Feb 11 17:25:11 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_Task Definition Parameter 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_Task Definition Parameter 1' lock='Configurator#1205810280640' creator='Configurator' createDate='1202772311656' lastModifier='Configurator' lastModDate='1205809980578' lastMod='17' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='1' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_Task Definition Parameter 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='167' y='10'/>
            </Activity>
           
            <Activity id='2' name='Call Form'>
                <ManualAction id='0' syncExec='true'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface</s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Using Taskdefinition parameters</s>
                    </WorkItemDescription>
                    <WorkItemName>
                        <ref>Using TaskDefinition parameters</ref>
                    </WorkItemName>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_WorkItem Types 1'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='107' y='16'/>
            </Activity>
           
        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>

Form
Download File 

  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflow to execute  IDM_COURSE_WFP_Task Definition Parameter 1
  4. A Form  Page appears (see the image below)

   
  1. Click the Submit button to complete the workflow

   

  1. Select the Server Tasks
  2. Select Manage Schedule
  3. Your workflow IDM_COURSE_WFP_Task Definition Parameter 1 will be available under this menu to be executed according a schedule date.
    1. This feature will be available as an exercise later.

(0.2)TaskDefinition Invisible


 
  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.

Scenario Workflow using the TaskDefinition parameter. This parameters will be useful to determine the visibility of the workflow. Using the invisble parameter.
Workflow IDM_COURSE_WFP_Task Definition Parameter 1   Download
Form IDM_COURSE_FRM_Task Definition Parameter 1    Download
Subprocess
none
Rule none
Comments
Bold Code
Workflow.

visibility='invisible' .  This value allow to the workflow to be hidden from the admin interface



  1. Go to your IDM_COURSE_WFP_Task Definition Parameter 1 workflow  and change the value from  visibility='runschedule'  to  visibility='invisible'. (see the code below)

CODE
Workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" createDate="Mon Feb 11 17:25:11 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_Task Definition Parameter 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_Task Definition Parameter 1' lock='Configurator#1205810280640' creator='Configurator' createDate='1202772311656' lastModifier='Configurator' lastModDate='1205809980578' lastMod='17' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='1' resultOption='delete' visibility='invisible' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_Task Definition Parameter 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='167' y='10'/>
            </Activity>
           
            <Activity id='2' name='Call Form'>
                <ManualAction id='0' syncExec='true'>
                    <WorkItemRequest>
                        <s>IDM Admin Interface</s>
                    </WorkItemRequest>
                    <WorkItemRequester>
                        <s>IDM System</s>
                    </WorkItemRequester>
                    <WorkItemDescription>
                        <s>Using Taskdefinition parameters</s>
                    </WorkItemDescription>
                    <WorkItemName>
                        <ref>Using TaskDefinition parameters</ref>
                    </WorkItemName>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_WorkItem Types 1'/>
                    </FormRef>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='107' y='16'/>
            </Activity>
           
        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>

Form
Download File 


  1. Select the Server Tasks 
  2. Select Run Schedule find your workflow IDM_COURSE_WFP_Task Definition Parameter 1
  3. Select Manage Schedule find your workflow IDM_COURSE_WFP_Task Definition Parameter 1

                                                                                                                    return to the top


Exercise 3: Workflow Using Split


                The goal of this exercise is to let you experience about how the split option in the workflow works.

  1. Workflow using split

(0.1)Workflow using split


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbean Project.

Scenario Workflow launch two notifications at the same time, this is because the start activity has configured the split option.
Workflow IDM_COURSE_WFP_Split                           Download
Form None
Subprocess
none
Email Temlplate
IDM_COURSE_EMT_Notificatin 1 Split      Download
IDM_COURSE_EMT_Notificatin 2 Split      Download
Comments
Bold Code
Workflow.

<Activity id='0' name='start' andSplit='true'>

andSplit= true allow the workflow launch the next (one or more) activities in parallel.




CODE
Workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" createDate="Mon Mar 17 19:33:25 CDT 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_Split" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_Split' creator='Configurator' createDate='1205800405671' lastModifier='Configurator' lastModDate='1205803121062' lastMod='13' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_Split' maxSteps='0'>
           
            <Activity id='0' name='start' andSplit='true'>
                <Transition to='Send Notification 1'/>
                <Transition to='Send Notification 2'/>
                <WorkflowEditor x='43' y='10'/>
            </Activity>
           
            <Activity id='1' name='end'>
                <WorkflowEditor x='226' y='10'/>
            </Activity>
           
            <Activity id='2' name='Send Notification 1'>
                <Action id='0' application='com.waveset.provision.WorkflowServices'>
                    <Argument name='op' value='notify'/>
                    <Argument name='template' value='IDM_COURSE_EMT_Notificatin 1Split'/>
                    <Argument name='toAddress' value='administrator@idm.com'/>
                </Action>
                <Transition to='end'/>
                <WorkflowEditor x='134' y='10'/>
            </Activity>
           
            <Activity id='3' name='Send Notification 2'>
                <Action id='0' application='com.waveset.provision.WorkflowServices'>
                    <Argument name='op' value='notify'/>
                    <Argument name='template' value='IDM_COURSE_EMT_Notificatin 2 Split'/>
                    <Argument name='toAddress' value='user@idm.com'/>
                </Action>
                <Transition to='end'/>
                <WorkflowEditor x='134' y='59'/>
            </Activity>
        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>


  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflow to execute  IDM_COURSE_WFP_Split
  4. A Task Results Page appears (see the image below)


   
  1. To validate the results
  2. Go to your notification folder




                                                                                                                    return to the top


Exercise 4: Workflow Using Rules


                The goal of this exercise is to let you experience about how  the different configuration for a workflow and form using the WorkItem Type parameter.

  1. Rule in Form
  2. Rule in Workflow

(0.1)Rule in Form


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbean Project.

Scenario Workflow using an activity and with one action that call a Manual Form displaying data.

The data were  populated using a rule in the form.
Workflow IDM_COURSE_WFP_Rule 1   Download
Form IDM_COURSE_FRM_Rule 1   Download
Subprocess
none
Rule IDM_COURSE_RUL_Rule 1   Download
Comments
Bold Code

Form.


 <Field name='slctContinents'> . Define the name of the field. This name will be  used to get the data selected from the select button.

This code is used to call a rule and populate the values for the select button.

<Property name='allowedValues'>
 <rule name='IDM_COURSE_RUL_Rule 1'/>
</Property>


<ref>slctContinents.value</ref>. Used to get the value selected previously in the select button.


CODE
Workflow
Download File 
Form
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Configuration PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" extensionClass="Form" lastMod="13" lastModifier="Configurator" name="IDM_COURSE_FRM_Rule 1"-->
<Configuration name='IDM_COURSE_FRM_Rule 1' lock='Configurator#1205814061437' creator='Configurator' createDate='1202518813437' lastModifier='Configurator' lastModDate='1205813761375' lastMod='13' wstype='UserForm'>
    <Extension>
        <Form name='IDM_COURSE_FRM_Rule 1' noDefaultButtons='true' objectLocationID='objectType=UserForm&amp;objectName=IDM_COURSE_FRM_Rule+1&amp;objectPath=0&amp;isBegin=true'>
            <Display class='EditForm'>
                <Property name='title' value='Using Rule in the Form'/>
                <Property name='subTitle' value='Populating the continents select button using a rule'/>
            </Display>
            <Field name='slctContinents'>
                <Display class='Select' action='true'>
                    <Property name='title' value='Continents'/>
                    <Property name='allowedValues'>
                        <rule name='IDM_COURSE_RUL_Rule 1'/>
                    </Property>
                    <Property name='help' value='property = allowedValues ; value = IDM_COURSE_RUL__Rule 1'/>
                </Display>
            </Field>
            <Field>
                <Display class='Label'>
                    <Property name='value'>
                        <ref>slctContinents.value</ref>
                    </Property>
                    <Property name='title' value='Value Selected'/>
                </Display>
            </Field>
            <Field name='submitCancelButtons'>
                <Field name=':complete'>
                    <Expansion>
                        <s>true</s>
                    </Expansion>
                </Field>
                <Field name=':formButton' button='true'>
                    <Display class='Button'>
                        <Property name='label' value='Submit'/>
                        <Property name='value' value='Next'/>
                        <Property name='command' value='Save'/>
                    </Display>
                </Field>
                <Field name=':formButton' button='true'>
                    <Display class='Button'>
                        <Property name='label' value='Cancel'/>
                        <Property name='value' value='Cancel'/>
                        <Property name='command' value='SaveNoValidate'/>
                    </Display>
                    <Derivation>
                        <null/>
                    </Derivation>
                </Field>
                <Field name='formButton'>
                    <Expansion>
                        <ref>:formButton</ref>
                    </Expansion>
                </Field>
            </Field>
        </Form>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</Configuration>

Subprocess
None
Rule
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" description="Contains the list of continent" lastMod="4" lastModifier="Configurator" name="IDM_COURSE_RUL_Rule 1"-->
<Rule name='IDM_COURSE_RUL_Rule 1' lock='Configurator#1205814068921' creator='Configurator' createDate='1202521220937' lastModifier='Configurator' lastModDate='1205813768859' lastMod='4'>
    <Description>Contains the list of continent</Description>
    <list>
        <s>Europe</s>
        <s>America</s>
        <s>Asia</s>
        <s>Australia</s>
        <s>Africa</s>
    </list>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</Rule>



  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflow to execute  IDM_COURSE_WFP_Rule 1
  4. A Form  Page appears (see the image below)

   
  1. Click Submit button to complete the exercise (see the image below).
   


(0.2) Rule in Workflow


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbean Project.

Scenario Workflow using an activity and with one action that call a Manual Form displaying data.

The data were  populated using a rule in the form. We are using a simple rule to  define the timeout for the form.

The purpose of this example is show that the rules can be used in workflows and forms.
Workflow IDM_COURSE_WFP_Rule 2   Download
Form IDM_COURSE_FRM_Rule 2   Download
Subprocess
IDM_COURSE_RUL_Rule 2   Download
Rule none
Comments
Bold Code
Workflow.


This code is used to call the rule that contains the time for the form  timeout .
<Timeout>
               <rule name='IDM_COURSE_RUL_Rule 2'/>
</Timeout>


CODE
Workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" createDate="Fri Feb 08 20:21:29 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_Rule 2" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_Rule 2' lock='Configurator#1205815063625' creator='Configurator' createDate='1202523689531' lastModifier='Configurator' lastModDate='1205814763562' lastMod='2' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_Rule 2' maxSteps='0'>
           
            <Activity id='0' name='start'>
                <Transition to='Call Form'/>
                <WorkflowEditor x='114' y='142'/>
            </Activity>
           
            <Activity id='1' name='Call Form'>
                <ManualAction id='0'>
                    <FormRef>
                        <ObjectRef type='UserForm' name='IDM_COURSE_FRM_Rule 2'/>
                    </FormRef>
                    <Timeout>
                        <rule name='IDM_COURSE_RUL_Rule 2'/>
                    </Timeout>
                </ManualAction>
                <Transition to='end'/>
                <WorkflowEditor x='332' y='278'/>
            </Activity>
           
            <Activity id='2' name='end'>
                <WorkflowEditor x='402' y='110'/>
            </Activity>
        </WFProcess>
    </Extension>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
</TaskDefinition>

Rule
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" description="Approval Timeout" lastMod="3" lastModifier="Configurator" name="IDM_COURSE_RUL_Rule 2"-->
<Rule name='IDM_COURSE_RUL_Rule 2' lock='Configurator#1205815069187' creator='Configurator' createDate='1202523834812' lastModifier='Configurator' lastModDate='1205814769125' lastMod='3'>
  <Description>Approval Timeout</Description>
  <i>-5</i>
  <MemberObjectGroups>
    <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
  </MemberObjectGroups>
</Rule>


  1. Select the Server Tasks
  2. Select Run Tasks
  3. Select the workflow to execute  IDM_COURSE_WFP_Rule 2
  4. A Form  Page appears (see the image below)



  1. Select the Server Tasks
  2. Select All Tasks




                                                                                                                    return to the top


Exercise 5: Workflow Using Java Class


                The goal of this exercise is to let you experience about how  the  use an external Java class in IDM.\
  1. Call Static Java Method (return string )
  2. Call Static Java Method (return list )
  3. Call Static Java Method with Parameters
  4. Call Non Static Java Method with Parameters

(5.1)Call Static Java Method ( return string )


  1. Download the code for the workflow and form or copy and paste the code from this exercise under you Netbeans Project.

Scenario Workflow using an activity to call an external java class returning an string.
Workflow IDM_COURSE_WFP_Java 1        Download
Form IDM_COURSE_FRM_Java 1         Download
Java Class Project
IdmJavaClass Netbeans Project  Download
Rule none
Comments
Bold Code
Workflow.

We use the next syntax  to call an external static java method

     <!-- Invoke a static Java method. -->
            <invoke class='class name' name='method name'>
                <!--  method argument 0  -->
                <!--  method argument n  -->
            </invoke>

Activity 1. Is used to call the java class. We are assigning the result of the java method call under the errorJavaClass variable.

We are calling the class PrintError and the method l logError() without any parameter. This method returns an String value.

Form.

We are populating the Label class with the value obtained from the java class in the errorJavaClass variable

Java Class

Static method called in the workflow.

     public static String logError(){
       
        String myError= "Logging Error Level 1";
       
        return myError;
    }
   



CODE
Workflow
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<!--  MemberObjectGroups="#ID#Top" createDate="Mon Mar 17 20:49:42 CDT 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_Java 1" visibility="runschedule"-->
<TaskDefinition name='IDM_COURSE_WFP_Java 1' lock='Configurator#1208492325859' creator='Configurator' createDate='1205804982171' lastModifier='Configurator' lastModDate='1208492025781' lastMod='2' taskType='Workflow' executor='com.waveset.workflow.WorkflowExecutor' suspendable='true' syncControlAllowed='true' execMode='sync' execLimit='0' resultLimit='0' resultOption='delete' visibility='runschedule' progressInterval='0'>
    <Extension>
        <WFProcess name='IDM_COURSE_WFP_Java 1' maxSteps='0'>
           
            <Activity id='0' name='start'>
            &