0

I built a workflow at development farm with SPD 2013. Then I follow the procedure mentioned here to package the reusable workflow into a wsp package. Then upload to another site and activated the feature.

However, the workflow still not show. I have to connect to the new site and click "Publish" the workflow to make it work. Is it essential? I want to avoid involve users into the deployment. Can I publish it at the back-end?

0

in 2013 its much more simpler! as its a wsp that means you can use powershell the same way that you use powershell for any other wsp!

so you added the wsp, installed the wsp so the final thing would be to enable the feature:

Enable-SPFeature -Identity <Feature> -Url <URL>

the above is run in powershell on the server!

EDIT

the full guide is:

https://msdn.microsoft.com/en-us/library/office/jj819316%28v=office.15%29.aspx

are you activating the feature at the correct levl (site collection or sub site).

what dependancies are there for this workflow as they must already exists befor deployment. What is your site type? is it a publishing site??

but i have a feeling that your not talking about that but rather the association. if it needs some accosiation than this might be the solution:

var workflowServiceManager = new WorkflowServicesManager(web);
var workflowSubscriptionService = workflowServiceManager.GetWorkflowSubscriptionService();

//get all workflows associated with the list
var subscriptions = workflowSubscriptionService.EnumerateSubscriptionsByList(listId);

//run all workflows associated with the list
foreach (var workflowSubscription in subscriptions)
{
    //initiation parameters
    var inputParameters = new Dictionary<string, object>();
    inputParameters.Add("MyProperty", "MyValue");

    workflowServiceManager.GetWorkflowInstanceService().StartWorkflowOnListItem(workflowSubscription, itemId, inputParameters);
}
  • I have enabled the feature but it is in "unpublished" status. (users cannot find the workflow) I have to connect the site with SPD and than publish it. Is my case normal? – Mark L Jan 23 '15 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.