Thursday, February 09, 2012 ..:: Forums ::.. Register  Login
 Forums Minimize
 
ForumForumMainstream Foru...Mainstream Foru...WorkflowWorkflowSetting custom field to current date via actionSetting custom field to current date via action
Previous Previous
 
Next Next
New Post
 11/17/2009 1:36 PM
 
 Modified By Support  on 11/17/2009 1:37:51 PM

You can decrease the protection level by editing the System Config value for "workflow_protection_level".  Here are some notes on the various protection levels:

At level 10, all triggers fired from within a workflow are skipped.
There currently is no way to block two separate workflows that fire each other.
The only thing we can do at this stage is block all workflows from firing other workflows.
At some point, we can relax this rule and attempt warn the user of a potential circular workflow.

At level 8, block a nested event using the workflow instance.
When trying to isolate a nested trigger, we cannot use the audit token directly as we do not have a DB transaction across all activities.
Instead we use the Workflow Instance ID as it is static across the entire workflow.
So, we lookup the Workflow Instance ID and use it in place of the audit token.

At level 7, block a nested event using the workflow instance and the audit table.
This filter is slightly more permissive, but may not catch anything not already filtered above. 

At level 5, a workflow cannot fire another identical workflow within the same activity.
This filter will only catch a workflow that updates itself or creates another new record.

However, I'm not sure that the problem is the protection level as it sounds like it is doing what we expect.  You are modifying the record inside a workflow and the protection level is preventing the workflow from firing again.  This sounds like desired behavior.  So, we probably need to research more into why the field is not getting updated. 

The problem may be related to updating a custom field.  Can you try to update a core field within the module as a test of the workflow engine?

New Post
 11/17/2009 4:47 PM
 
Updating a core string field works. updating a core date field doesn't. Problem may be with my xoml.. What is the magic trick, can you not just edit workflow_actiion_shells->xoml?

If I look at it via Splendid, it doesn't show my edits and it runs the previous, non-hand edited action..
New Post
 11/17/2009 5:26 PM
 
Ok, I have gotten it to work. public string CURRENT_DATE { get { return String.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now); } } It had to be in a sql format and then you can use the actual designer to put in {ActivityBind Workflow1,Path=CURRENT_DATE} as the value so no back editing of the xoml.
New Post
 6/21/2011 9:01 PM
 

I would like to do something similar, but I think this level of coding is a little out of my league. I would like to create a new call record in a workflow and set the start time and date based on a field from Quotes. There are several ways to accomplish what I want, but I am not sure what options I have. What date operations are allowed in workflow besides typing in the literal date? Can I add 3 days based on the create date or set the date in the call equal to a date from quotes?

New Post
 6/22/2011 3:22 AM
 

Our 5.5 release allows you to use formulas in a workflow, so you can do something like =DateTime.Today.AddDays(3)

In this case, the leading "=" means that we pass the text to the Microsoft rules engine for evaluation.

Previous Previous
 
Next Next
ForumForumMainstream Foru...Mainstream Foru...WorkflowWorkflowSetting custom field to current date via actionSetting custom field to current date via action


  
Copyright (c) 2006-2010 SplendidCRM Software, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2012 by DotNetNuke Corporation