Showing posts with label SP Designer Workflow. Show all posts
Showing posts with label SP Designer Workflow. Show all posts

Saturday 19 December 2015

Install and Configure the SharePoint 2013 Workflow Platform.

Steps to install SharePoint 2013 workflow platform type with the new workflow engine.

Let’s begin the installation and configuration-

1. Download the workflow manager from http://go.microsoft.com/fwlink/?LinkID=252092
2. Run workflowmanager.exe as admin.
3. Click on "Install" button.



4. Click "I Accept" on the Prerequisites screen.



5. When the Workflow Manager 1.0 installation process has completed. Click "Continue" on  the configuration screen.


6. You will get "Workflow Manager Configuration Wizard" after this. Choose "Configure Workflow  Manager with Default Settings (Recommended)".



7. On "New Farm Configuration" (not to be confused with SharePoint Farm), enter the SQL server  instance and the credentials as required.

8. In the "Configure Service Account" section, enter the appropriate service account to run the  Workflow Manager.

9. Check the Allow Workflow Management over HTTP on this computer (for development), but you  don’t need to do it on production.

10. In the "Certificate Generation Key" section, enter a unique key and press the right  arrow to continue.


11. In the "Summary" dialogue box, verify all information entered and click OK (tick mark). Also, you  can save it by clicking on the "Copy" link button.



12. Now the "Configuration Process" will start.

13. If all the configuration processes are right, then you will get a screen similar to the one below.

14. Verify that the following services are running:
             a. Workflow Manager Backend.
             b. Windows Fabric Host Service.
             c. Service Bus Gateway.

15. Open IIS and check if "Workflow Management Site" is working or not. We get two ports  configured as:
             a. *:12290 (https)
             b. *:12291 (http)



16. To check the proper configuration, open the following link in your browser.
             a. http://servername:12291
             b. https://servername:12290




17. All the required databases are created as given below.



18. Open "SharePoint Management Shell" and run the following command.
 

19. After successful execution of the command, a new service application will be created and  its administrator will be set by the user provided while doing workflow configuration (optional).



20. If the service application is correct, you will get the screen as given below.


21. After the successful installation of "SharePoint 2013 Workflow Manager" a new platform  called SharePoint 2013 Workflow will come.

It provides the following features, as shown below:
Now take the full advantage of the SharePoint 2013 Workflow engine.


🚀 "Happy Coding" 🚀

Saturday 8 August 2015

SharePoint 2013 REST API Get requests from the designer workflow.

SharePoint 2013 provides a completely new workflow engine, which has a new "Call HTTP web service" action that enables us to communicate with the web service from our workflow.

In this blog post, I will show you how you can use this new action method for a REST API GET request to a SharePoint list.

I have created a list "WebServiceList" and inserted dummy data into it as shown below.


Open SharePoint Designer 2013 and create a workflow attached to the list created above. Use the platform type as SharePoint 2013 workflow; otherwise Call HTTP web service method will not be available.
In our normal CSOM(Client Side Object Model), we call the REST API to get data back in JSON format. You need these headers as:

Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose

In the workflow add the "Build the Dictionary" action of above headers as:

Click on the three dots to add items to the dictionary.






Now, add the HTTP call web service method with type GET as given below:


Test your REST call in the browser as given below:

Add the header dictionary variable created just above to the web service and set the request type to "GET" as:


Then click OK.
Add the GET action, and now we will get the result from the response content variable as

Now get the CountItems of the Output variable (allTitles) from the get action.
Then take one variable and set it to "0" and insert Loop (Loop n times). Inside the loop again, add the GET action to get all titles from the variable JsonResult and log it. Add the Calculate action to add "1" to the loop index variable and then again set its value. Now end the workflow.
Complete workflow is given below


See the Tasks and Workflow History list details below; you will get the data fetched from the source list is logged in the history list.

Hope this will help you!


🚀"Happy Coding"🚀