Workflow not triggered
-
terça-feira, 20 de março de 2012 12:56
Hi.
I have been trying to get SCSM 2012 to send an email to the "Assigned User" of a Manual Activity when the Assigned is changed and the activity status and area property are of a certain value: the area and status values are not changing on a Manual Activity reassignment.
The UpdateInstance is
<UpdateInstance>
<Criteria>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Area$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>{8a1aa5ce-47be-4ba1-8f9e-4cf0291081da}</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Pre">$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAssignedToUser' TypeConstraint='CustomSystem_Library!System.Domain.User']/Property[Type='CustomSystem_Library!System.Domain.User']/UserName$</Property>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Property State="Post">$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAssignedToUser' TypeConstraint='CustomSystem_Library!System.Domain.User']/Property[Type='CustomSystem_Library!System.Domain.User']/UserName$</Property>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Criteria>
</UpdateInstance>The workflow is not fired ! Is there something wrong ?
Thanks in advance.
Giafar
- Editado CiocciR6 terça-feira, 20 de março de 2012 13:01
Todas as Respostas
-
terça-feira, 20 de março de 2012 14:01ModeradorIt will not fire if AssignedToUser was empty before changes. By design.
http://www.scsmsolutions.com/ freemanru (at) gmail (dot) com
-
terça-feira, 20 de março de 2012 14:09It's not firing even if i change the AssigneToUser using the console :-( !
Giafar
-
terça-feira, 20 de março de 2012 15:54ModeradorIt will not fire based on a change in AssignedTo. The assigned to is just a where property (so it will fire when area or status change and Assigned To is now X)
Makenzie Snow
-
quarta-feira, 21 de março de 2012 07:19
Ok, let me explain the scenario.
I have a change request template with an empty manual activity and using the SDK I create a new CR and the ApplyTemplate().
Once the template is applied i get the Manual Activity and I set the Area, the Status and the assigned user with just one EnterpriseManagementObjectProject.Commit(). How can I write the correct criteria to fire a workflow notification ? And what if I change the user in a second step ? Area and Status are always the same.
Thanks in advance.
Giafar
-
quinta-feira, 22 de março de 2012 16:06
The only way I've been able to get this to work is /CreateRelationship and /DeleteReslationship. Unfortunately, there is no way I know of to evaluate the creation of a relationship and another property in a type projection.
Lie Makenzie said, your WF is evaluating the Assigned To property itself, not the property 'username' in the User class.
Allen Anderson Systems Analyst Arizona State University - OKED Knowledge Informatics

