Skip to content

Commit

Permalink
[Task 336] docs: Updated documentation.
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kantchev <[email protected]>
  • Loading branch information
akantchev committed Aug 29, 2024
1 parent 207b3a0 commit 4ffad86
Showing 1 changed file with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ Special output is needed for the ScheduledWorkflowItem.

This is a meta decorator. Add this to whichever function you want to be the entry point of the workflow.


#### `@AsyncWorkflowItem`

##### Supported Parameters
Expand All @@ -181,7 +180,6 @@ This is a meta decorator. Add this to whichever function you want to be the entr
- `target` - The name of the next in line item.
- `linkedItem` - The ID of the workflow to call


##### Outputs

Special output is needed for the AsyncWorkflowItem.
Expand Down Expand Up @@ -384,14 +382,15 @@ Those inputs are optional.

- `security_assignees` (type `Array/LdapUser`) - Any user from this array of users will be authorized to fill in this form.
- `security_assignee_groups` (type `Array/LdapGroup`) - Any user member of any of the groups will be authorized to fill in this form.
- `security_group` (type `LdapGroup`) - Any user member of this group will be authorized to fill in this form.
- `timeout_date` (type `Date`) - If not null, this input item will wait until date and will continue workflow execution.
- `security_group` (type `LdapGroup`) - Any user member of this group will be authorized to fill in this form.
- `timeout_date` (type `Date`) - If not null, this input item will wait until date and will continue workflow execution.

Note that those parameters should match also the input parameters of the workflow.

##### Known Limitations for the Input Parameters

The names of the variables in the additional method decorators should be as following:

- `security_assignees` - for the security assignees parameter.
- `security_assignee_groups` - for the security assignee group parameter.
- `security_group` - for the security group parameter.
Expand All @@ -404,12 +403,19 @@ You can specify multiple output variables that would hold the answer of the user
#### Example Workflow

```ts
import { Workflow, In, Out, Item, RootItem, UserInteractionItem } from "vrotsc-annotations";
import {
Workflow,
In,
Out,
Item,
RootItem,
UserInteractionItem,
} from "vrotsc-annotations";

@Workflow({
name: "User Interaction",
path: "VMware/PSCoE",
description: "Adding user interaction parameters"
description: "Adding user interaction parameters",
})
export class UserInteractionWorkflow {
@Item({ target: "userInteraction1Enter", exception: "" })
Expand All @@ -419,17 +425,25 @@ export class UserInteractionWorkflow {
}

@UserInteractionItem({
target: "userInteraction2Enter"
target: "userInteraction2Enter",
})
public userInteraction1Enter() {
System.log(`Start user interaction 1`);
}

@UserInteractionItem({
target: "userInteractionExit"
target: "userInteractionExit",
})
public userInteraction2Enter(@In security_assignees: LdapUser[], @In security_assignee_groups: LdapGroup[], @In security_group: LdapGroup, @In timeout_date?: Date, @In userInteractionAnswer?: string) {
System.log(`User interaction component answered with '${userInteractionAnswer}'`);
public userInteraction2Enter(
@In security_assignees: LdapUser[],
@In security_assignee_groups: LdapGroup[],
@In security_group: LdapGroup,
@In timeout_date?: Date,
@In userInteractionAnswer?: string
) {
System.log(
`User interaction component answered with '${userInteractionAnswer}'`
);
}

@Item({ target: "end" })
Expand Down

0 comments on commit 4ffad86

Please sign in to comment.