System Account start workflow on creation

  • 10 March 2016
  • 5 replies
  • 19 views

Badge +4

I have a workflow that creates an item on another site via web service. In my initial testing I used my user account for the credentials to perform the web service request, but moving to production I need to use a service account - however, when the item is created by service account the workflow on creation of the new item doesn't trigger because it was created by a service account....

In short:

Site A: item created by user > Call Web Service > Site B: item created by System > start WF when item is created (need work around)


5 replies

Badge +16

is there a reason you aren't using the nintex workflow action "create item in another site" as opposed to using the web service call?

Badge +4

Alas, we're transmitting across farms... My current workaround is to pause 1 min (safe looping off) and then use another web service to StartWorkflowOnListItem.

I'm still wondering if there's a way to enable system account to start On Item Creation workflows, or if I always need to resort to using two actions to create the item and then start the workflow.

This list is a little easier as no items are manually created in the destination so I always know the ID (I keep count on the source), but I'd have to also throw in a query list action if I didn't know the ID of the item I just created.

Userlevel 7
Badge +11

Open a SharePoint Management Shell as administrator and run the following command to first determine what value the property has:

$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService  $spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled

This will return either FALSE or TRUE. If the Value of the property is false, set it to true by entering the following commands:

$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService  $spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled = $true  $spWebService.Update()
Badge +4

No effect. Still shows Created By: System Account and OnCreation WF did not trigger.

Badge +3

Hi Daniel,

In this case don't trigger workflow on Item creation.

1. Get ID of newly created item from web service output result.

Reference :

XML parsing using Nintex | My Learnings

2. Manually trigger workflow using Item ID of step 1 using nintex web service,

179982_pastedImage_1.png

-Rohan Mhatre

Reply