This hands-on lab assumes you have minimum programming
experience.
Before you begin, you need to install the following software on your
computer.
| Scenario | Workflow
using an activity that launch the Enable workflow services, this
operation will allow you enable any user in idm |
| Workflow | IDM_COURSE_WFP_WorkflowService
Enable User 1 Download |
| Comments
Bold Code |
Workflow. Activity id= 1. Shows the activity used to call the Enable User Action id = 0. Shows you under the application parameter the name of the java class used by idm to enable user Argument op. Is used to specify the worflow services that we are using. Argument accountId. Is used to specify the user who will be enabled. You can use any other calculated expression using Xpress Argument doWaveset. Is used to specify if we should enable or not the idm account ID. Remember lighthouse is the name of tha account id for the IDM itself. true=enable, false = no enable. This is very usefull when the user has more than one resource assigned. |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Mon Feb 04 23:37:57 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Enable User 1" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Enable User 1' creator='Configurator' createDate='1202189877281' lastModifier='Configurator' lastModDate='1203787774890' lastMod='12' 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_WorkflowService Enable User 1' maxSteps='0'> <Activity id='0' name='start'> <Transition to='Enable User'/> <WorkflowEditor x='59' y='84'/> </Activity> <Activity id='1' name='Enable User'> <Action id='0' application='com.waveset.session.WorkflowServices'> <Argument name='op' value='enableUser'/> <Argument name='accountId' value='999012'/> <Argument name='doWaveset' value='true'/> </Action> <Transition to='end'/> <WorkflowEditor x='264' y='148'/> </Activity> <Activity id='2' name='end'> <WorkflowEditor x='476' y='126'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |





| Scenario | Workflow
using an activity that launch the Disable workflow services, this
operation will allow you disable any user in idm |
| Workflow | IDM_COURSE_WFP_WorkflowService
Disable User 1 Download |
| Comments
Bold Code |
Workflow. Activity id= 1. Shows the activity used to call the Disable User Action id = 0. Shows you under the application parameter the name of the java class used by idm to disable an user Argument op. Is used to specify the worflow services that we are using. Argument accountId. Is used to specify the user who will be enabled. You can use any other calculated expression using Xpress Argument doWaveset. Is used to specify if we should disable or not the idm account ID. |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Mon Feb 04 23:31:24 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Disable User 1" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Disable User 1' lock='Configurator#1206257862781' creator='Configurator' createDate='1202189484250' lastModifier='Configurator' lastModDate='1206257562718' 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_WorkflowService Disable User 1' maxSteps='0'> <Activity id='0' name='start'> <Transition to='Disable User'/> <WorkflowEditor x='59' y='84'/> </Activity> <Activity id='1' name='Disable User'> <Action id='0' application='com.waveset.session.WorkflowServices'> <Argument name='op' value='disableUser'/> <Argument name='accountId' value='999010'/> <Argument name='doWaveset' value='true'/> </Action> <Transition to='end'/> <WorkflowEditor x='274' y='54'/> </Activity> <Activity id='2' name='end'> <WorkflowEditor x='476' y='126'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |



| Scenario | Workflow
using an activity that launch the Delete workflow services, this
operation will allow you delete any user in idm |
| Workflow | IDM_COURSE_WFP_WorkflowService
Delete User 1 Download |
| Comments
Bold Code |
Workflow. Activity id= 1. Shows the activity used to call the Delete User Action id = 0. Shows you under the application parameter the name of the java class used by idm to delete an user Argument op. Is used to specify the worflow services that we are using. Argument accountId. Is used to specify the user who will be deleted. You can use any other calculated expression using Xpress |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Sun Feb 17 14:17:53 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Delete User 1" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Delete User 1' lock='Configurator#1206259007890' creator='Configurator' createDate='1203279473890' lastModifier='Configurator' lastModDate='1206258707828' lastMod='8' 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_WorkflowService Delete User 1' maxSteps='0'> <Variable name='accountId' value='999010'/> <Activity id='0' name='start'> <Transition to='Delete User'/> <WorkflowEditor x='59' y='84'/> </Activity> <Activity id='1' name='Delete User'> <Action id='0' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='deleteUser'/> <Argument name='accountId' value='$(accountId)'/> </Action> <Transition to='end'/> <WorkflowEditor x='276' y='56'/> </Activity> <Activity id='2' name='end'> <WorkflowEditor x='476' y='126'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |





| Scenario | Workflow
using an activity that launch the Create View workflow services, this
operation will allow you create an user in idm when you use the User
View as a Parameter |
| Workflow | IDM_COURSE_WFP_WorkflowService
Create View 1 Download |
| Comments
Bold Code |
Workflow. The nex code is used to define the variables content for the user to be created. <Variable name='accountId' value='999010'/> Activity id= 1. Shows the activity used to call the Create User Action id = 0. Shows you under the application parameter the name of the java class used by idm to create a view Argument op. Is used to specify the worflow services that we are using. Argument type. Is used to specify the view we want to create Argument accountId. Is used to specify the user who will be created. You can use any other calculated expression using Xpress Action id = 1. Is used to set the values for the user view, we are using the path expression to set to the view values Action id = 2 . Is a workflow services used to provision accounts in IDM. newViewUser contains the user view values to be created |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Mon Feb 04 23:01:59 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Create View 1" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Create View 1' lock='Configurator#1206259434718' creator='Configurator' createDate='1202187719296' lastModifier='Configurator' lastModDate='1206259134640' lastMod='32' 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_WorkflowService Create View 1' maxSteps='0'> <Variable name='accountId' value='999010'/> <Variable name='firstName' value='Malcom'/> <Variable name='lastName' value='Young'/> <Variable name='password' value='pa55w0rd'/> <Variable name='email' value='malcom.young@idm.com'/> <Activity id='0' name='start'> <Transition to='Create User'/> <WorkflowEditor x='59' y='84'/> </Activity> <Activity id='1' name='Create User'> <Action id='0' name='Create a View for the User' application='com.waveset.session.WorkflowServices'> <Argument name='op' value='createView'/> <Argument name='type' value='User'/> <Argument name='id' value='$(accountId)'/> <Argument name='viewId' value='User'/> </Action> <Action id='1' name='Set the values for the View'> <expression> <block> <set name='user.global.accountId'> <ref>accountId</ref> </set> <set name='user.global.password'> <ref>password</ref> </set> <set name='user.global.firstname'> <ref>firstName</ref> </set> <set name='user.global.lastname'> <ref>lastName</ref> </set> <set name='user.global.fullname'> <concat> <ref>firstName</ref> <s> </s> <ref>lastName</ref> </concat> </set> <set name='user.global.email'> <ref>email</ref> </set> </block> </expression> </Action> <Action id='2' name='Provisioning User' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='provision'/> <Argument name='user' value='$(newViewUser)'/> <Argument name='noCreate' value='false'/> </Action> <Transition to='end'/> <WorkflowEditor x='278' y='54'/> </Activity> <Activity id='2' name='end'> <WorkflowEditor x='476' y='126'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |




| Scenario | Workflow
using an activity that launch the Notify workflow services, this
operation will allow you send emails thru idm |
| Workflow | IDM_COURSE_WFP_WorkflowService
Email 1 Download |
| Email Template |
IDM_COURSE_EMT_WorkflowService Email 1 Download |
| Comments
Bold Code |
Workflow. Activity id= 2. Shows the activity used to call the notify workflow service Action id = 0. Shows you under the application parameter the name of the java class used by idm to use the notify workflow service. Argument template. Is used to specify the email template. |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Sat Feb 09 00:35:13 CST 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Email 1" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Email 1' lock='Configurator#1206261056406' creator='Configurator' createDate='1202538913906' lastModifier='Configurator' lastModDate='1206260756343' lastMod='14' 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_WorkflowService Email 1' maxSteps='0'> <Variable name='accountId' value='999010'/> <Variable name='firstName' value='Malcom'/> <Variable name='lastName' value='Malcom'/> <Variable name='password' value='pa55w0rd'/> <Variable name='email' value='malcom.young@idm.com'/> <Activity id='0' name='start'> <Transition to='Create User'/> <WorkflowEditor x='43' y='10'/> </Activity> <Activity id='1' name='end'> <WorkflowEditor x='216' y='10'/> </Activity> <Activity id='2' name='Send Notification'> <Action id='0' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='notify'/> <Argument name='template' value='IDM_COURSE_EMT_WorkflowService Email 1'/> </Action> <Transition to='end'/> <WorkflowEditor x='153' y='128'/> </Activity> <Activity id='3' name='Create User'> <Action id='0' name='Create a View for the User' application='com.waveset.session.WorkflowServices'> <Argument name='op' value='createView'/> <Argument name='type' value='User'/> <Argument name='id' value='$(accountId)'/> <Argument name='viewId' value='User'/> </Action> <Action id='1' name='Set the values for the View'> <expression> <block> <set name='user.global.accountId'> <ref>accountId</ref> </set> <set name='user.global.password'> <ref>password</ref> </set> <set name='user.global.firstname'> <ref>firstName</ref> </set> <set name='user.global.lastname'> <ref>lastName</ref> </set> <set name='user.global.fullname'> <concat> <ref>firstName</ref> <s> </s> <ref>lastName</ref> </concat> </set> <set name='user.global.email'> <ref>email</ref> </set> </block> </expression> </Action> <Action id='2' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='provision'/> <Argument name='user' value='$(newViewUser)'/> <Argument name='noCreate' value='false'/> </Action> <Transition to='end'> <eq> <ref>WF_ACTION_ERROR</ref> <s>true</s> </eq> </Transition> <Transition to='Send Notification'/> <WorkflowEditor x='116' y='10'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |


| Scenario | Workflow
used to send an email template, basic functionality |
| Workflow | IDM_COURSE_WFP_WorkflowService
Email 2 Download |
| Email Template |
IDM_COURSE_EMT_WorkflowService Email 2 Download |
| Comments
Bold Code |
Workflow. The Activity 1 is used to call the notify workflow service(op=notify). The Argument template is used to especify the email template. Email Template. The body tag is used to define the content of the email to be sent by IDM. |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Tue Apr 15 10:01:58 CDT 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Email 2" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Email 2' lock='Configurator#1208277820062' creator='Configurator' createDate='1208271718500' lastModifier='Configurator' lastModDate='1208277520031' lastMod='4' 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_WorkflowService Email 2' maxSteps='0'> <Activity id='0' name='start'> <Transition to='Email Notification'/> <WorkflowEditor x='43' y='10'/> </Activity> <Activity id='1' name='Email Notification'> <Action id='0' name='Send email' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='notify'/> <Argument name='template' value='IDM_COURSE_EMT_WorkflowService Email 2'> <Comments>
 The name of an Email Template object in the Lighthouse repository. 
 This describes the structure of the email and may include references
 to workflow variable or arguments specified in the call.
 </Comments> <String>IDM_COURSE_EMT_WorkflowService Email 2</String> </Argument> </Action> <Transition to='end'/> <WorkflowEditor x='126' y='10'/> </Activity> <Activity id='2' name='end'> <WorkflowEditor x='204' y='10'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |
| Email Template |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE EmailTemplate PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" name="IDM_COURSE_EMT_WorkflowService Email 2"--> <EmailTemplate name='IDM_COURSE_EMT_WorkflowService Email 2' lock='Configurator#1208277816390' creator='Configurator' createDate='1208272140984' lastModifier='Configurator' lastModDate='1208277516328' lastMod='5' smtpHost='localhost' fromAddress='idm.course@idm.com' toAddress='any.user@idm.com' htmlEnabled='true'> <subject>IDM with Passion Course</subject> <body>This is an example about how to use a basic email template</body> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </EmailTemplate> |

| Scenario | Workflow
passing variables to the notification, including variables in the
workflow,action and the notification. |
| Workflow | IDM_COURSE_WFP_WorkflowService
Email 3 Download |
| Email Template |
IDM_COURSE_EMT_WorkflowService Email 3 Download |
| Comments
Bold Code |
Workflow. We are declaring the variable applications with a list of the applications "assigned" to the user. This variable is used later in the body notification. Email Template. We are declaring the variable appsOutIdm and using the remove XPRESS function to eliminate the lighthouse account from the list. The body tag is used to define the content of the email to be sent by IDM. We are using the syntax $(variable) to get the value of it. |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Tue Apr 15 11:37:38 CDT 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Email 3" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Email 3' creator='Configurator' createDate='1208277458968' lastModifier='Configurator' lastModDate='1208287450281' lastMod='4' 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_WorkflowService Email 3' maxSteps='0'> <Variable name='accountId' value='999010'/> <Activity id='0' name='start'> <Transition to='Email Notification'/> <WorkflowEditor x='43' y='10'/> </Activity> <Activity id='1' name='Email Notification'> <Action id='0' name='Send email' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='notify'/> <Argument name='template' value='IDM_COURSE_EMT_WorkflowService Email 3'> <Comments>
 The name of an Email Template object in the Lighthouse repository. 
 This describes the structure of the email and may include references
 to workflow variable or arguments specified in the call.
 </Comments> <String>IDM_COURSE_EMT_WorkflowService Email 3</String> </Argument> <Variable name='applications'> <List> <String>Lighthouse</String> <String>AD</String> <String>Solaris</String> <String>Oracle</String> <String>Mainframe</String> </List> </Variable> </Action> <Transition to='end'/> <WorkflowEditor x='126' y='10'/> </Activity> <Activity id='2' name='end'> <WorkflowEditor x='204' y='10'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |
| Email Template |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE EmailTemplate PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" name="IDM_COURSE_EMT_WorkflowService Email 3"--> <EmailTemplate name='IDM_COURSE_EMT_WorkflowService Email 3' creator='Configurator' createDate='1208277505859' lastModifier='Configurator' lastModDate='1208287508546' lastMod='15' smtpHost='localhost' fromAddress='idm.course@idm.com' toAddress='any.user@idm.com'> <Variable name='appsOutIdm'> <remove> <ref>applications</ref> <s>Lighthouse</s> </remove> </Variable> <subject>IDM with Passion Course</subject> <body>This is an example about how to use a basic email template.
Showing information for the $(accountId) user.
All Applications assigned $(applications)
All Applications assigned removing IDM application $(appsOutIdm)</body> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </EmailTemplate> |

| Scenario | Workflow
used to send an email template, basic functionality |
| Workflow | IDM_COURSE_WFP_WorkflowService
Email 4 Download |
| Email Template |
IDM_COURSE_EMT_WorkflowService Email 4 Download |
| Comments
Bold Code |
Email
Template. On the Email Template tag we are enabling the HTML content for the notification body changing the htmlEnabled='false' to htmlEnabled='true' The body tag is used to define the content of the email to be sent by IDM. Inside the body we are inserting HTML code to be displayed in the notification. |
| CODE |
| Email Template |
| <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE EmailTemplate PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" name="IDM_COURSE_EMT_WorkflowService Email 4"--> <EmailTemplate name='IDM_COURSE_EMT_WorkflowService Email 4' lock='Configurator#1208293070421' creator='Configurator' createDate='1208287776765' lastModifier='Configurator' lastModDate='1208292770375' lastMod='4' smtpHost='localhost' fromAddress='idm.course@idm.com' toAddress='any.user@idm.com' htmlEnabled='true'> <Variable name='oneApps'> <get> <ref>appsOutIdm</ref> <s>1</s> </get> </Variable> <Variable name='appsOutIdm'> <remove> <ref>applications</ref> <s>Lighthouse</s> </remove> </Variable> <subject>IDM with Passion Course</subject> <body><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<h4 align="center">This is an example about how to use a basic email template with HTML.</h4>
<ul>
 <li>Showing information for the $(accountId) user.</li>
 <li>All Applications assigned $(applications)</li>
 <li>All Applications assigned removing IDM application $(appsOutIdm)
</li>
</ul>
</body>
</html>

</body> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </EmailTemplate> |


| Scenario | Workflow
used to send an email template, basic functionality |
| Workflow | IDM_COURSE_WFP_WorkflowService
Email 5 Download |
| Email Template |
IDM_COURSE_EMT_WorkflowService Email 5 Download |
| Comments
Bold Code |
Email
Template. On the Email Template tag we are enabling the HTML content for the notification body changing the htmlEnabled='false' to htmlEnabled='true' The body tag is used to define the content of the email to be sent by IDM. Inside the body we are inserting CSS & HTML code to be displayed in the notification. |
| CODE |
| Email Template |
| <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE EmailTemplate PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" name="IDM_COURSE_EMT_WorkflowService Email 5"--> <EmailTemplate name='IDM_COURSE_EMT_WorkflowService Email 5' lock='Configurator#1208296000468' creator='Configurator' createDate='1208293389093' lastModifier='Configurator' lastModDate='1208295700421' lastMod='2' smtpHost='localhost' fromAddress='idm.course@idm.com' toAddress='any.user@idm.com' htmlEnabled='true'> <Variable name='oneApps'> <get> <ref>appsOutIdm</ref> <s>1</s> </get> </Variable> <Variable name='appsOutIdm'> <remove> <ref>applications</ref> <s>Lighthouse</s> </remove> </Variable> <subject>IDM with Passion Course</subject> <body><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css"> 
body {
	background-color: #FFFFCC;
}

body, td, th, h3, h6 {
	color: #330000;
}

h1, h2, h4, h5 {
 color: #660000;
}

a {
	color: #003366;
}
</style>

</head>




<body>
<h4 align="center">This is an example about how to use a basic email template with HTML & CSS.</h4>
<ul>
 <li>Showing information for the $(accountId) user.</li>
 <li>All Applications assigned $(applications)</li>
 <li>All Applications assigned removing IDM application $(appsOutIdm)
</li>
</ul>
</body>
</html>
</body> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </EmailTemplate> |


| Scenario | Workflow
using an activity that launch the Create View workflow services, this
operation will allow you create an user in idm when you use the User
View as a Parameter. Also we use the Notify workflow services, this operation will allow you send emails thru idm and an Audit Event to create an audit record in IDM for the create operation. |
| Workflow | IDM_COURSE_WFP_WorkflowService
Audit 1 Download |
| Email Template |
IDM_COURSE_EMT_WorkflowService Audit 1 Download |
| Comments
Bold Code |
Workflow. We use the Activity Audit Event to execute an action to call the audit workflow service. This workflow service allow you to generate a record in the audit table for idm and will give you the capability to get a report about the operation realized. |
| CODE |
| Workflow |
| <?xml version='1.0'
encoding='UTF-8'?> <!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'> <!-- MemberObjectGroups="#ID#Top" createDate="Fri May 09 00:03:48 CDT 2008" extensionClass="WFProcess" name="IDM_COURSE_WFP_WorkflowService Audit 1" visibility="runschedule"--> <TaskDefinition name='IDM_COURSE_WFP_WorkflowService Audit 1' lock='Configurator#1210386407312' creator='Configurator' createDate='1210309428453' lastModifier='Configurator' lastModDate='1210311291843' 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_WorkflowService Audit 1' maxSteps='0'> <Variable name='accountId' value='999014'/> <Variable name='firstName' value='Brian'/> <Variable name='lastName' value='Johnson'/> <Variable name='password' value='pa55w0rd'/> <Variable name='email' value='brian.johnson@idm.com'/> <Activity id='0' name='end'> <WorkflowEditor x='383' y='10'/> </Activity> <Activity id='1' name='start'> <Transition to='Create User'/> <WorkflowEditor x='43' y='10'/> </Activity> <Activity id='2' name='Create User'> <Action id='0' name='Create a View for the User' application='com.waveset.session.WorkflowServices'> <Argument name='op' value='createView'/> <Argument name='type' value='User'/> <Argument name='id' value='$(accountId)'/> <Argument name='viewId' value='User'/> </Action> <Action id='1' name='Set the values for the View'> <expression> <block> <set name='user.global.accountId'> <ref>accountId</ref> </set> <set name='user.global.password'> <ref>password</ref> </set> <set name='user.global.firstname'> <ref>firstName</ref> </set> <set name='user.global.lastname'> <ref>lastName</ref> </set> <set name='user.global.fullname'> <concat> <ref>firstName</ref> <s> </s> <ref>lastName</ref> </concat> </set> <set name='user.global.email'> <ref>email</ref> </set> </block> </expression> </Action> <Action id='2' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='provision'/> <Argument name='user' value='$(newViewUser)'/> <Argument name='noCreate' value='false'/> </Action> <Transition to='end'> <eq> <ref>WF_ACTION_ERROR</ref> <s>true</s> </eq> </Transition> <Transition to='Send Notification'/> <WorkflowEditor x='116' y='10'/> </Activity> <Activity id='3' name='Send Notification'> <Action id='0' application='com.waveset.provision.WorkflowServices'> <Argument name='op' value='notify'/> <Argument name='template' value='IDM_COURSE_EMT_WorkflowService Audit 1'/> <Argument name='accountId'> <ref>accountId</ref> </Argument> </Action> <Transition to='Audit Event'/> <WorkflowEditor x='171' y='349'/> </Activity> <Activity id='4' name='Audit Event'> <Action id='0' application='com.waveset.session.WorkflowServices'> <Argument name='op' value='audit'/> <Argument name='type' value='User'/> <Argument name='name' value='Account created was $(accountId)'/> <Argument name='status' value='success'/> <Argument name='action' value='Create'/> <Argument name='resource' value='Lighthouse account'/> <Argument name='accountId' value='$(accountId)'/> <Argument name='error' value='User Duplicated'/> </Action> <Transition to='end'/> <WorkflowEditor x='246' y='193'/> </Activity> </WFProcess> </Extension> <MemberObjectGroups> <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/> </MemberObjectGroups> </TaskDefinition> |



