How do you change workflow deployment location?

  • 20 January 2017
  • 1 reply
  • 4 views

Badge +4

How do you change the workflow deployment location?  We are developing in K2 for Visual Studio, and had our projects in a project structure that was not working for us.  For example, the project name was formatted CompanyName.Department and the workflow was under the root folder of that project.  We recently completed a large scale change to how our projects are structured, such that they're now simply names as the ProjectName, and the Workflows are under a Workflows folder instead of root.  The issue is when we deploy, instead of creating a new version of the existing workflow, it creates an all new workflow in an all new location based on the project structure.  The old workflow would deploy under CompanyName.ProjectName, and now it's deploying under ProjectNameWorkflows.  This isn't acceptable, as this means we either have to alter all our forms and reporting, or revert back to our old project structure.    

 

When we change the location of a SmartObject in our project, it finds the existing one based on matching GUIDs and creates a new version of that; the location can be different, but if the GUIDs are the same it doesn't matter where it is.  And if we deploy a brand new SmartObject and find it's in a folder we don't want it, we can change where it's located via the Designer.  How do we do something similar with Workflows?  

 

EDIT: for the time being we'll add a second project to the solution, and this second project will be named and structured exactly as it used to be.  When deploying workflows, the deployment location doesn't take into account the solution name, so this works and the original workflow is replaced.  I did encounter an error when deploying stating "SmartObject Server Exception: SmartObject name must be unique", but removing the currently existing auto-generated reporting SmartObjects for the workflow allowed the deployment to complete.  This may break some things as the new SmartObjects have different GUID's, but we aren't using them so it's acceptable for us.  Despite all this, if anyone has any idea how to solve the original question for this thread, that would be great.  :)


1 reply

Badge +4

Coincidentally, we had a meeting with our K2 rep scheduled for this afternoon, and I asked this question.  This is functionality as designed, and at the moment there is no method of changing the deployment location to be something other than how it is now.  Not the answer I was hoping for, but good info to know, otherwise I'd spend days looking for another method.  :)

Reply