How to use a Workflow Job to create JAMS objects


JAMS Workflow jobs can be used to create JAMS objects on the fly.  Using the PSScript activity (JAMS 6.1 and later), users can create Jobs, Setups, Variables, virtually any object that users can create using Powershell outside of JAMS can be done using this method.

For example:

$JAMSDefaultServer = "SULLIVAN"
$MyVar = New-item -name {MyNewVar} -ItemType Variable
$MyVar.Description = "My New Var" 
$MyVar.Value = "Hellllooo"
$MyVar.DataType = [MVPSI.JAMS.DataType]::Text
$MyVar.CurrentLength = 10

You'll notice the Variable name in {} as this is referencing a workflow variable as described in this section of the developers guide:

Our workflow variable value for {MyNewVar} is assigned using the "Assign" workflow activity, which allows users to assign specific values to workflow variables, or to take other workflow variables and assign them to this current variable.

Have more questions? Submit a request