Reputation: 1430
Currently I am trying to find a way to have a template that is used across a shared environment capable of having a different workflow in use for each environment.
For example say I have a bike template shared between sites, I have one site that stocks the bike in a warehouse and a separate site that is a store front to sell the bike. The approval process will be different for these sites, the warehouse will simply go from Draft > Published whereas the store front wants to check over the details before displaying to the customer so they use a Draft > Pending Approval > Publish workflow.
Say I already have a bunch of bikes defined in both sites, how can I make a change so that for each different site a different workflow is used by the bikes. If possible I would like to avoid a solution that requires code.
I am guessing that I will need to duplicate the templates and have a separate one for each site (e.g. WH Bike and Sales Bike) which isn't really ideal either as this means lots of manual fixing of the existing workflow values.
Upvotes: 1
Views: 137
Reputation: 7994
Instead of using a separate workflow, it sounds like you just need a separate stage and action that is only available to your store front.
For example, your single workflow might look like this:
Stage 1: Draft
Actions:
Stage 2: Pending Approval
Stage 3: Publish
If the only difference is the stages, you can definitely go with security to use a single workflow and flow users through their own actions and stages.
Upvotes: 1
Reputation: 4470
Reworked my answer:
You can approach this by using the sitecore rules engine.
You can take a look at DYNAMIC WORKFLOW module in the Sitecore Marketplace.
It should allow you to create the rules and execute the start workflow action.
Taken from the module documentation:
Start workflow – moves item into a specified workflow and starts the workflow process. Example: a landing workflow used when item gets created but a specific workflow should be applied depending on item location in the content tree.
Upvotes: 1