Enumerating and Starting SP-2013 Designer Workflows Programmatically
Hello,
I'm currently working with Office-365 Site-collections. I have a requirement of developing a
Sandbox Solution for Enumerating and Starting
all Designer Workflows Associated to a Given List. The list contains workflows of both SP-2010 and SP-2013 templates. They have to be started programmatically on select Items on a Button Click event.
I have tried using the property - SPList.WorkflowAssociations,
but the collection of WorkflowAssociations returned by this property consists of SP-2010 workflows only. The ones of SP-2013 are not listed.
I went through online blogs that suggested to use the APIs of 'Microsoft.SharePoint.WorkflowServicesBase.dll' (WorkflowServicesManager,
WorkflowSubscriptionService, etc..), in order to enumerate SP-2013 Workflows as well.
I'm not able to find the Api-package that installs the dll to GAC. Morever, I'm not sure if the APIs from this DLL can be used
in Sandbox Solutions. (I have installed SP-2013 SDK as well as
Workflow Manager package, but the above DLL is not found anywhere in my Dev-box).
It would be helpful if I get appropriate guidance on which APIs to use in Sandbox Solution for the above requirement.
Thanks
Abhijith R Shastry
Hi,
According to your post, my understanding is that you wanted to start workflow using Sandbox solution.
It is not supported to use the “Microsoft.SharePoint.WorkflowServicesBase.dll” API in sandbox solution(office 365/SharePoint online).
Also, it is not a good recommend to use the sandbox solution in SharePoint 2013 or SharePoint online.
As a workaround, we can use the Client Object Model to achieve the same scenario.
http://www.vrdmn.com/2014/05/managing-sharepoint-2013-workflows-with.html
http://www.codeproject.com/Articles/607127/Using-SharePoint-Workflow-Services-JS-API
What’s more, you also use the SharePoint APP to achieve it.
http://sharepoint.stackexchange.com/questions/87015/solved-start-a-workflow-of-the-host-web-via-sharepoint-app-and-jsom
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support
Similar Messages
-
how to view and restore sharepoint 2013 designer workflows and how to redeploy with newer version to environments
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint LeadHi,
In SharePoint Designer 2010, we could not save the workflow as a template directly except the reusable workflow.
However, in SharePoint Designer 2013, we can just save all the types workflow as a template, then you can import the workflow into the new environment.
http://blogs.msdn.com/b/workflows_for_product_catalogs/archive/2012/11/02/deploying-a-workflow-on-a-different-server.aspx
In SharePoint Designer 2013, every time we publish the workflow, we would get a newer version workflow, and the old workflow version would be overwritten.
So, when you deploy the workflow in the environment, the workflow would the newer version.
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
Hi,
We have a requirement to update a column value once the item has been approved.
Following settings have been made in the publishing articles list:
Require content approval for submitted items : yes
Create major and minor (draft) versions
Who should see draft items in this document library? :Only users who can edit items
Require documents to be checked out before they can be edited? : yes
I have createdatu a Sharepoint 2013 workflow to check if Approval sts of current item = 0 i.e. Approved , then check out and update the item and finally checkin the item. Everything works fine till this point except that the minor version of the item is
checked in. Due to this the updated columns are not published to others.
Also, I created a Sharepoint 2010 workflow to SET CONTENT APPROVAL = APPROVED and started this workflow from my list workflow above, but the item does not get checked-in and always shows "In Progress" status with comment "The item is currently
locked for editing. Waiting for item to be checked in or for the lock to be released.".
Please let me know where I am missing out so that once the item is approved, column value gets updated and current item is still in Approved status.
ThanksHi,
According to your post, my understanding is that you want to update Column value after current item is Approved and then publish major version using Sharepoint 2013 designer workflow.
You will get into this kind of Catch-22 situation trying to set the Content Approval Status in SharePoint Designer workflow:
- You must check out the document before you can change the Content Approval Status
- You can't change the Content Approval Status once the document in checked out
Since you set the Require documents to be checked out before they can be edited=Yes, you will need to check out the document when run the workflow on the item. But you cannot approve a document when it is checked
out. So the logic in workflow conflicts.
As a workaround, you can use the Start Another Workflow action to start the normal Approval workflow on the document. The built-in Approval workflow can work with a document that’s not checked out.
The designer approval workflow also can work with a document that’s not checked out.
You can create two workflow using SharePoint Designer 2013.
First, create a SharePoint 2010 platform workflow.
Then, create a SharePoint 2013 platform workflow.
Then when the SharePoint 2013 platform workflow start, it will start the SharePoint 2010 platform workflow to set content approval status, then the SharePoint 2013 platform workflow will update current item value.
More information:
SharePoint Designer Workflow Content Approval Issue
SharePoint 2010 Approval Workflow with Content Approval
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Issue in sharepoint 2013 designer workflow kickoff
We are facing issues in sharepoint 2013 designer workflow kickoff. When we kick off custom designer workflow using AD user with contribute/approve access, sendemail from task does not send an email. When we kickoff using administrator account task in
the designer workflow sends an email. There seems to be multiple issues with kickoff. and it even does not give any error task gets created but send email does not work.
Another issue in another approach-
We are also not able to kickoff using one AD account which we are not login in everyday. If we kickoff using this account after 2/3 days kickoff says invalid state of object for that user. Once we login manually with that admin workflow kick off account
again kick off starts. We do not want to let current user kickoff the workflow.
In both cases we are using new AD import in sp2013 and sync is done every 5 minutes.
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint LeadMay be a permission issue, see whether the contributor has enough permission to participate in the workflow.
Also try to set Design permission to test and see whether that works.
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if the reply helps you -
SP 2013 Designer Workflow problems retrieving data from Web Service
Hi all,
I am creating a SharePoint 2013 Designer Workflow, and I am having trouble retrieving data from a web service. The web service URL is
http://services.odata.org/V2/Northwind/Northwind.svc/Customers and the problem I am having is with the SharePoint Designer Workflow “Call HTTP Web Service” action URL. The URL I am
having problems with is shown below:
http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax
or
http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CustomerID,CompanyName,ContactName,ContactTitle,Address,City,PostalCode,Country,Phone,Fax&$format=json
The SharePoint 2013 Designer workflow works OK if I try to retrieve two items like "CompanyName" and "ContactName", but when I try to retrieve three or more items the workflow doesn’t work it just pauses
with no error message. The URL that works OK is shown below:
http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$format=json&$select=CompanyName,ContactName
or
http://services.odata.org/V2/Northwind/Northwind.svc/Customers('[%Current Item:Customer ID%]')?$select=CompanyName,ContactName&$format=json
Does anyone know why I cannot retrieve more than two items from a web server? Am I making a mistake with the URL?
I hope you can
ColinHi Amit,
According to your description, my understanding is that you want to approve workflow task using web service in SharePoint 2013.
For troubleshooting this issue, please provide the more detailed code.
Here are some similar posts, please check if they are useful:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/b999a417-dce3-4590-9173-89aea91f23a3/complete-workflow-after-approving-all-tasks?forum=sharepointdevelopment
http://www.sharepointblog.in/2013/07/programmatically-approvereject-task-in.html
http://aarebrot.net/blog/2011/10/how-sloppiness-and-spworkflowtask-altertask-could-inadvertantly-lock-your-workflow-task/
I hope this helps.
Thanks,
Wendy
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Wendy Li
TechNet Community Support -
Sharepoint 2013 designer workflow custom sendemail activity
Does anybody know sharepoint 2013 designer workflow custom sendemail activity. Current OOB sendemail action from designer workflow cancels the entire workflow when sendemail fails.
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint LeadHi Amit,
What error did you meet when you used the OOB ‘Send Email’ action?
I suggest you fix the error rather than creating a new workflow ‘Send Email’ activity.
Of course, you can also customize a workflow activity to send email, there are two acticles about creating a custom workflow activity for your reference:
http://msdn.microsoft.com/en-us/library/office/jj163911(v=office.15).aspx
http://www.sharepoint-reference.com/Blog/Lists/Posts/Post.aspx?ID=37
I hope this helps.
Thanks,
Wendy
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Wendy Li
TechNet Community Support -
Sharepoint 2013 designer workflow auto approve task after due date is passed
sharepoint 2013 designer workflow auto approve task after due date is passed.
Could we approve the task automatically once due date is apssed?
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint LeadHi Amit,
If your task is created by a workflow (first) and stored in a separate task list, you can create another workflow on this particular task list, then each workflow instance would check if current task is expired (not approved/rejected), then
determine if update current task's "Task Outcome" as approved (and update task status as complete), and then create a retention policy on this paricular task list to trigger the workflow on due date .
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support -
We are getting sharepoint 2013 designer workflow task cancellation only for a specific sharepoint user. Its working for other users.
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint LeadHi Amit,
Based on the error message, I recommend to check if the user with issue has user profile generated in User Profile Service Application.
Please also check the ULS log for detailed error message and a screenshot of the workflow steps for further research.
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support -
I am looking for custom sendemail in sharepoint 2013 designer workflow using dictionary object with email template from list
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint LeadHi Greetings.
pls check if it helps you.
http://msdn.microsoft.com/en-us/library/office/jj554504(v=office.15).aspx
Please remember to click 'Mark as Answer' on the answer if it helps you -
SP 2013 - Use PowerShell to Deploy, Activate and Associate a SharePoint Designer Workflow
Hello Community!
I'm using SP 2013 Enterprise and I need to use PowerShell to deploy a reusable SharePoint Designer Workflow to the solution gallery, activate it, activate the workflow feature, and then associate the workflow to a list and or library. Has anyone done
this before and if so please provide guidance and code examples.
Thanks!
Tom
Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
Linked-In - SharePoint GypsyHi Tom,
Below are the links might help, please check:
Lists the Windows PowerShell cmdlets that you can use to manage workflows in a SharePoint 2013 farm.
http://technet.microsoft.com/en-us/library/ee906558(v=office.15).aspx
Series of articles written by Sahil Malik about SharePoint 2013 workflow
http://www.codemag.com/Article/1301021
http://www.codemag.com/Article/1304021
SharePoint 2013: How to Schedule a PowerShell Script to Run Automatically
http://www.proactivespeaks.com/2013/07/30/sharepoint-2013-how-to-schedule-a-powershell-script-to-run-automatically/
Similar threads:
http://stackoverflow.com/questions/15045189/how-to-start-workflow-2013-from-powershell
http://sharepoint.stackexchange.com/questions/65555/deploying-workflow-wsp-as-sandbox-solution
http://sharepoint.stackexchange.com/questions/89312/launch-sharepoint-2013-workflow-w-javascript
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
SP 2013 designer workflow deployment error on new SP Farm
We are using SharePoint 2013 enterprise and InfoPath 2013 for the workflow requirements as mentioned below:
For Approval, Reminder and Alert Emails we have used SharePoint designer workflows with following details:
SP2010 Workflow
This is a site workflow
Get Manager and other custom user profile property to identify whether the current approver has not reached beyond then department head.
This is called from the SP 2013 workflow with parameter of created by field initially and later with the current approver in a loop implemented in designer workflow
SP 2013 workflow
This is a list workflow attached to the form library
This executes the sp2010 workflow to get manager and custom user profile property to identify level of manager
Then starts task process in loop assigned to manager, manager of manager and so on. Loop ends after the approver reaches to the department head level
This sets the published fields in the InfoPath form library to control the views with the current approver and state of the form based on the approval status
We are still facing issues with deploying the workflow and get the following error while publishing when the workflow is deployed from one farm to another (i.e. from dev to test environment).
We
have followed instructions outline at this link: http://msdn.microsoft.com/en-us/library/office/jj819316(v=office.15).aspx#section2
Other Notes:
At the destination server, I am able to create and publish new SP 2013 and 2010 type of workflow without any error.
Thanks
Ibrahimwe have fixed in the same week but due to unavailability of time, i am posting reply now.
We have managed to solve this by installing latest updates from Microsoft.
We have installed SP1 + April updates for SharePoint 2013.
Thanks,
Ibrahim -
Check user belongs to a particular sharepoint group in sharepoint 2013 designer workflow
Hello, How to validate a user belongs to a particular sharepoint group in sharepoint designer 2013 workflow.
You can make a REST call from workflow to determine if a user belongs to a group.
REST API reference and samples
Calling the SharePoint 2013 Rest
API from a SharePoint Designer Workflow
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom. -
Update Managed Metadata field in SharePoint 2013 Designer Workflow for O365
Hi Guys,
I need to update the managed metadata field in SharePoint Custom List using Workflow but its not working. I have also tried to use the HTTP WebService POST Operation but no luck.
Am doing this for a SharePoint Online (O365) Site.
Has anyone worked on something similar and was able to get it running ?
I saw a post to create a custom Workflow Activity but I don't have a choice to go with the custom code option.
http://patrickboom.wordpress.com/2013/07/23/workflow-activity-set-managed-metadata-column/
I was able to achieve this by creating a SP 2010 based Workflow for O365. Which means that it worked well with SP 2010.
Is there a different way to do it in 2013 ? I tried almost all options apart from creating custom Activity but nothing worked out.
Any help would be great.
Thanks,
Nutan
Nutan SharmaHi Nutan,
According to your description, my understanding is that you want to update Managed Metadata field with SharePoint 2013 Designer for SharePoint Online.
As far as I know, there is not an OOB action to achieve your requirement with SharePoint 2013 Designer for SharePoint 2013. Customizing a workflow action is a better option to achieve it. Why didn’t you customize a workflow action as Patrick’s blog?
In addition, please take a look at the article about Nintex workflow, check whether it is useful for you:
http://habaneroconsulting.com/insights/setting-managed-metadata-fields-in-a-nintex-workflow#.UykBSf6KDHo
As this issue is about SharePoint Online, I suggest you create a new thread on SharePoint Online forum:
http://social.technet.microsoft.com/Forums/en-US/home?forum=onlineservicessharepoint . More experts will assist you.
I hope this helps.
Thanks,
Wendy
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Wendy Li
TechNet Community Support -
Send Email Summary using with SharePoint 2013 designer Workflow
Dear Friends,
please find the scenario below,and provide your solution for this.
1.SharePoint 2013 task list have 'N' number of tasks with Assigned to people.
2.Each task assigned to some person like Person 1 has Task 1 & Task 2 - Person 2 has Task 3 & Task 4.
3.In end of the day both the guys will get a single email alert with assigned tasks URL's.
I need a solution using with only SharePoint Designer 2013 workflow.
Please help me out.
Thanks in Advance :)
abbijohnHi Victoria,
I want configurable email template like below, this email template resides in emailmessages list.(configurable)
Hello
{CurrentItem:
CreatedBy},
Please
review and
approve {CurrentItem:
Title}</a>.
What I want is when I use this email message pulled up from email message list in designer workflow for actual list, it should replace CurrentItem:
Title with current item title.
But it does not work. The benefit of this approach
is if I want to change email content, I just goto emailmessages list and change the content and workflow will take it.
But it does not work and workflow takes
CurrentItem:
Title as text.
MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead -
SharePoint 2013 Designer Workflows
I have created a new SharePoint custom workflow using Designer 2013. I have the conditions and actions working fine, I also am able to send emails using workflows. However the task process doesn't seem to work. I set up the workflow to update the Tasks lists
and published it. I used both existing tasks and tried with creating a new tasks list, but neither the task list is being updated nor the task email is being sent.
Note, I am receiving the emails when I assign an action within the workflow, also I receive the task emails when I use OOB workflows. I am not receiving emails only when using Designer Workflows. I tried OOB on the same library where I enabled designer workflow
and it is sending task emails and updating the task lists and history as well.
Any insight?
Thanks!Hi ,
According to your description, my understanding is that you failed to update task list using SharePoint Designer workflow 2013.
For reproducing your issue, I create a designer workflow 2013 for a task list and try to update Due Date column. But it is working fine.
Could you provide more information about the steps of your workflow?
Also please have a look at the thread:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/88075158-7aff-4696-863e-c00b2b460efe/trouble-updating-task-in-sharepoint-designer-approval-workflow
Best Regards,
Eric
Eric Tao
TechNet Community Support
Maybe you are looking for
-
Itunes wont instal on my dell espiron N7110
i get this error. 'Microsoft. VC80.CRT ,type="win32",version="8.0.50727. 6195",publicKey Token="1fc8b3b9a1e18e3b",processor Architecture="x86"". Please refer to Help and Support for more information. HRESULT: 0x800736B3. please help
-
Hello , In my scenario when i click on a particular transaction an IE browser is opened which asks for usr/pwd . How to handle this in eCATT ? do i need to use another tool for recording the Browser or eCATT handles this issue, the test case says as
-
What kind of data structure should I use?
I have a user input dialog basically like following which need user input the sample number to specifiy each file belongs to which sample: user input the sample number in the following dialog: file name sample test 1 1 te
-
Wonder if anyone can help me with a question? I am new to data guard and only recently setup my first implementation of a primary and standby Oracle 11 g database. It's all setup correctly, i.e no gaps sequences showing, no errors in the alert logs a
-
Hey folks. I am trying to create stop motion animation using a digital SLR and importing the images to Elements 3, then using the slideshow option. My issue is I can't select a default setting that will move through the images fast enough - it seems