How to read workflow internal status in SharePoint designers work flow

Copper Contributor

Hi All,

I want to read current  workflow internal status in SharePoint designers work flow to send and email creator when ever internal status is suspended .

 

Regards

Madhu

 

1 Reply
To read the current workflow internal status in SharePoint Designer, you can use the "Get Internal State" action. This action allows you to retrieve the internal status of the current workflow instance and store it in a workflow variable, which you can then use in subsequent workflow actions.

To send an email to the creator when the workflow internal status is suspended, you can use a conditional statement to check the internal status variable and send the email if it matches the "Suspended" status.

Here are the steps to implement this in SharePoint Designer:

1. Add the "Get Internal State" action to your workflow. This action can be found under "Workflow Context" in the "Action" tab.

2. Set the "Internal State Name" property to "WorkflowState". This will retrieve the internal state of the current workflow instance and store it in a variable called "WorkflowState".

3. Add a conditional statement to check if the "WorkflowState" variable equals "Suspended". You can use the "If any value equals value" condition for this.

4. If the condition is true, add an action to send an email to the creator of the workflow. You can use the "Send an Email" action for this.

5. In the email action, set the "To" field to the workflow creator by clicking the "Workflow Lookup" button and selecting "Created By".

6. In the email body, you can include a message notifying the creator that the workflow has been suspended.

7. Save and publish the workflow.

Once the workflow is published, it will retrieve the internal state of the current workflow instance and check if it is in a "Suspended" state. If it is, the workflow will send an email to the creator notifying them that the workflow has been suspended.