Func46_FireWorkflow

<< Click to Display Table of Contents >>

Navigation:  Modules > Asset Management > Software License Management > Authorization Analyzer (Complex license types) > AA Functions >

Func46_FireWorkflow

Description

The purpose of this function is to fire a workflow.  The workflow may be used to do any number of things, such as perform a notification.  The workflow will be staged and a thread number recorded as the result.  The workflow will be picked up and processed when the workflow engine next runs.

NOTE: DO NOT use this function as the last function of the rule.  It will return the thread number of the workflow thread created, and that number will be mistaken as the LURs returned by the rule if this is the last function in the rule.  Make sure there is at least one function after this that returns the proper LUR value.

NOTE:  Be careful when designing a workflow that performs notification.  This rule may be analyzed every housekeeping run, which means users will be getting notified every time that happens.  If you are going to perform a notification, only do so for certain events that are true error conditions that are unlikely to happen but once and/or test for a condition in your workflow, send the notification, then set a field in the underlying table to cause the test condition to evaluate to false (to stop subsequent notifications from going out unintended.)

The workflow will be staged and will not be processed until the next time the workflow engine runs.  The analyzer will continue processing the rule definitions until complete, and will not wait on the results of the workflow.

 

Processing Notes

This function goes through the following steps:

Stages the workflow with the thread variables set as follows:

1.VKEY = assetidxmslNo (primary key of authorization under test)

2.V1 = AssetID (primary key of any associated asset)

3.V2 = mslNo (primary key of associated MSL record)

4.V3 = value sent in ParmVal1

5.V4 = value sent in ParmVal2

6.V5 = value sent in ParmVal3

7.V6 = value sent in ParmVal4

8.vR = email address of authorization under test's contact.  If none exists, then email address of related asset's contact

 

Inputs

 

Parameter

Explanation

Workflow to fire

(iParmVal1)

The primary key value of the workflow to fire.

V3

(ParmVal1)

Forwarded to workflow thread as V3.  This parameter accepts tags as well as AA-specific tags.

V4

(ParmVal2)

Forwarded to workflow thread as V4.  This parameter accepts tags as well as AA-specific tags.

V5

(ParmVal3)

Forwarded to workflow thread as V5.  This parameter accepts tags as well as AA-specific tags.

V6

(ParmVal4)

Forwarded to workflow thread as V6.  This parameter accepts tags as well as AA-specific tags.

 

Outputs

 

Result

Result Explanation

Confidence Adjustment

Return Value

True

Workflow staged and returned a non-zero thread value

N

wfThreadNo

False

Workflow staging returned 0 for thread number, indicating a failure in staging the thread.

Y

0

Else

General error occurred.

Y

0