WorkflowUpdateState

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > Workflow >

WorkflowUpdateState

Description

Update the workflow state to the specified one.

Syntax

call DBWShell("WorkflowUpdateState StateName")

Parameters

StateName

the name of the state to update

Remarks

As further input parameters, the unique_id list and the given ECO_ID have to be passed through the dbwscript.in file.

@DOCUMENT_UNIQUE_IDS

a space separated values corresponding to record unique_ids to update the state of

@ECO_ID

Optional. ECO_ID related to passed unique_id list

Example

'enter uids and ECO_ID

Set fso = CreateObject("Scripting.FileSystemObject")
Set tfolder = fso.GetSpecialFolder(TemporaryFolder)
Set a = fso.OpenTextFile(tfolder & "\dbwscrpt.in", mode, True)
field = "@DOCUMENT_UNIQUE_IDS"
uids = "1234 5678 9012 2345"
a.WriteLine(field & "=" & uids)
field = "@ECO_ID "
ecoId = "10001001"
a.WriteLine(field & "=" & ecoId)
a.Close
StateName = "MyState"
DBWShell("WorkflowUpdateState " & StateName)