-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #350 from vmware/feature/337-canvas-item-for-sched…
…uled-workflow [vrotsc, vrotsc-annotations], (#337) Canvas Item For Scheduled Workflow
- Loading branch information
Showing
20 changed files
with
653 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
typescript/vrotsc/e2e/cases/canvas-items/scheduled-workflow.wf.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Workflow, Out, In, Item, RootItem, ScheduledWorkflowItem } from "vrotsc-annotations"; | ||
|
||
@Workflow({ | ||
name: "Scheduled Workflow Test", | ||
path: "VMware/PSCoE", | ||
description: "Scheduling another workflow and binding values correctly", | ||
attributes: { | ||
waitingTimer: { | ||
type: "Date" | ||
}, | ||
counter: { | ||
type: "number" | ||
}, | ||
first: { | ||
type: "number" | ||
}, | ||
second: { | ||
type: "number" | ||
}, | ||
workflowScheduleDate: { | ||
type: "Date" | ||
}, | ||
scheduledTask: { | ||
type: "Task" | ||
} | ||
} | ||
}) | ||
export class HandleNetworkConfigurationBackup { | ||
@ScheduledWorkflowItem({ | ||
target: "printScheduledDetails", | ||
linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" | ||
}) | ||
public scheduleOtherWf(@In first: number, @In second: number, @In workflowScheduleDate: Date, @Out scheduledTask: Task) { | ||
} | ||
|
||
@Item({ target: "scheduleOtherWf" }) | ||
public prepareItems(@In @Out first: number, @In @Out second: number, @In @Out workflowScheduleDate: Date) { | ||
first = 1; | ||
second = 2; | ||
workflowScheduleDate = System.getDate("1 minute from now", undefined); | ||
} | ||
|
||
@Item({ target: "end" }) | ||
public printScheduledDetails(@In scheduledTask: Task) { | ||
System.log(`Scheduled task: ${scheduledTask.id}, [${scheduledTask.state}]`); | ||
} | ||
|
||
|
||
@Item({ target: "prepareItems", exception: "" }) | ||
@RootItem() | ||
public start() { | ||
System.log("Starting workflow"); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
typescript/vrotsc/e2e/cases/node_modules/@types/vrotsc-annotations/index.d.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.