This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Switch workflow

Former Member
Former Member
Hi all,

we receive different kind of invoices, what are checked by different departments. so I created a separate workflow for evry kind. However when the payment approved, all the workflow are the same: it goes to the Accounting dept. they regsiter it, pay it and done. So my idea is to create a separate workflow for the Accouting, and shorten the already created worlows: at the last state I just switch to the new Accounting workflow. I found a thread here:
community.m-files.com/index.php
but at the last state's Properties I can not see the Workflow in the list. What do I miss?
Thanks: Peter
Parents
  • You can change Class, Workflow and State in an action script as shown in this example:

    Dim iClass, iWorkflow, iWFState
    'Change class
    iClass = Vault.ClassOperations.GetObjectClassIDbyAlias("Cl.YourAlias")
    PropertyValues.SearchForProperty(100).TypedValue.SetValue MFDataTypeLookup, iClass
    'Change the workflow properties
    iWorkflow = Vault.WorkflowOperations.GetWorkflowIDbyAlias("WF.YourAlias")
    PropertyValues.SearchForProperty(38).TypedValue.SetValue MFDataTypeLookup, iWorkflow
    iWFState = Vault.WorkflowOperations.GetWorkflowStateIDbyAlias("WFS.YourAlias")
    PropertyValues.SearchForProperty(39).TypedValue.SetValue MFDataTypeLookup, iWFState
    'Save the changed propertyvalues to the object
    Vault.ObjectPropertyOperations.SetAllProperties ObjVer, true, PropertyValues
Reply
  • You can change Class, Workflow and State in an action script as shown in this example:

    Dim iClass, iWorkflow, iWFState
    'Change class
    iClass = Vault.ClassOperations.GetObjectClassIDbyAlias("Cl.YourAlias")
    PropertyValues.SearchForProperty(100).TypedValue.SetValue MFDataTypeLookup, iClass
    'Change the workflow properties
    iWorkflow = Vault.WorkflowOperations.GetWorkflowIDbyAlias("WF.YourAlias")
    PropertyValues.SearchForProperty(38).TypedValue.SetValue MFDataTypeLookup, iWorkflow
    iWFState = Vault.WorkflowOperations.GetWorkflowStateIDbyAlias("WFS.YourAlias")
    PropertyValues.SearchForProperty(39).TypedValue.SetValue MFDataTypeLookup, iWFState
    'Save the changed propertyvalues to the object
    Vault.ObjectPropertyOperations.SetAllProperties ObjVer, true, PropertyValues
Children
No Data