Tuesday, October 25, 2011

SCSM Workflow Date Time Token Error in the Authoring Console

The Authoring Tool workflow has an option of "relative" when using date fields. However, when you check the checkbox and enter a relative token such as [now] the authoring console doesn't like it and will not save. I haven't seen anyone else complain about this, so maybe it is just my environment. Either way, I had to find a workaround. It is pretty simple.

First what might happen is you are creating an on update trigger. You select a date field and select the relate checkbox.


















You might be able to click okay, but later down the road when you save you might get this token error.













If this is happening to you, specify the expression that you want, except do not use "relative." For now, insert a static date. Save the management pack and open the xml. Go find your expression. You can see mine below.
<Expression>     <SimpleExpression>         <ValueExpression>              <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledStartDate$</Property>                            </ValueExpression>                            <Operator>LessEqual</Operator>                            <ValueExpression>                              <Value>2011-09-25T05:00:00</Value>                            </ValueExpression>                          </SimpleExpression>                        </Expression>

Replace <Value>2011-09-25T05:00:00</Value> with <Token>[now]</Token>


That's it.

No comments:

Post a Comment