In diagram below third activity is a Automatic Activity in workflow. User is NT Authority. Can i change this user to previous activity user (jsha13)
-
1May I ask why would you want to do it? It's there for a reason as System user actually performed the action– Andrey MarchukCommented May 8, 2014 at 11:35
-
As seen in diagram above, my second activity is a manual activity and i am passing a message into this for next user. Message is seen properly in previous activity message box in second activity. Now i pass some message in third activity as third activity is a automatic activity i am passing a message through code for fourth message. My message is not flowing . I am suspecting this is a NT authority which is creating the issue. refer this for more information .– Jitender sharmaCommented May 8, 2014 at 11:43
-
@user978511 : refer this for more information - [tridion.stackexchange.com/questions/5421/…– Jitender sharmaCommented May 8, 2014 at 11:43
2 Answers
As I understand it, you don't really want to change the user executing all workflow activities, what you want is the workflow history to reflect that this action was caused by a different user than "System".
I've worked around this requirement in the past by:
- Configuring a different account for the workflow service (didn't want to use SYSTEM for this because this account is used in many other services)
- Configuring this different account to be a valid Impersonation account
- In my automatic activity code, impersonate a different user (the performer of the previous actions)
- Calling Finish Activity while impersonating
This will effectively change who performed the action, but does require some additional code and configuration.
In nutshell handling activities has next algorithm: if next activity assignee is workflowAgent(can be changed in tcmConfig...but by default is NT AUTHORITY) - notify workflow service, that it has to execute this activity. If somehow you'll be able to assign this activity to other user (which I doubt...at least earlier were business rules, which had ensured that automatic activity is assigned to WFAgent), Workflow Service will not able to execute automated activity...It will not get any info, that it needs execute something. Regarding to your first question(the problem itself) - need time for investigation, can't answer "on fly".