-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vrotsc, vrotsc-annotations] (#337) Add Workflow canvas Scheduled Workflow item #350
[vrotsc, vrotsc-annotations] (#337) Add Workflow canvas Scheduled Workflow item #350
Conversation
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
} | ||
|
||
/** | ||
* Default source file printer will directly print the source file with the method node body statements. | ||
*/ | ||
export class DefaultSourceFilePrinter implements SourceFilePrinter { | ||
public printSourceFile(methodNode: MethodDeclaration, sourceFile: SourceFile): string { | ||
public printSourceFile(methodNode: MethodDeclaration, sourceFile: SourceFile, itemInfo: WorkflowItemDescriptor): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The itemInfo
parameter should be optional (as in the interface it is optional).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interface it should not be optional, will fix it
…re-aria into feature/337-canvas-item-for-scheduled-workflow Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
*/ | ||
export default class ScheduledWorkflowItemDecoratorStrategy implements CanvasItemDecoratorStrategy { | ||
constructor(private readonly sourceFilePrinter: SourceFilePrinter = new ScheduledWorkflowItemSourceFilePrinter()) { } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a good idea to add JSDoc to each of the public methods.
docs/versions/latest/Release.md
Outdated
@RootItem() | ||
public start() { | ||
System.log("Starting workflow"); | ||
======= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove (probably leftover from the merge conflict).
itemInfo.target = propValue; | ||
break; | ||
|
||
case "exception": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you didn't declare the exception
parameter in the vro-types/vrotsc-annotations/index.d.ts
nor you're handling it in the decorator. You should remove this case if you don't need to handle the exception
parameter.
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Stefan Genov <stefan.genov@broadcom.com>
Signed-off-by: Alexander Kantchev <akantchev@vmware.com>
Signed-off-by: Alexander Kantchev <akantchev@vmware.com>
Description
@ScheduledWorkflowItem
The decorator is used to specify a scheduled workflow item that will be called.
Supported Parameters
target
- The name of the next in line item. Same as@Item
.linkedItem
- The ID of the workflow to schedule.In order to bind inputs and outputs, you do it with the
@In
and@Out
decorators. This is the same way we do it for other items.Inputs
Special input is needed for the ScheduledWorkflowItem.
workflowScheduleDate
- {Date} is required. The name must beworkflowScheduleDate
. If this is missing an error is thrown. We don't check if the type isDate
but Aria Orchestrator will complain.Outputs
Special output is needed for the ScheduledWorkflowItem.
scheduledTask
- {Task} is optional. If it's missing nothing will happen, if it's added, then the name must bescheduledTask
. This is the task that is scheduled.Will give the following:
Checklist
Fixed #XXX -
orClosed #XXX -
prefix to auto-close the issueTesting
e2e tests added to the pr and screenshots as proof it works
Fixed #337