Placeholder Event
What does the Placeholder Event Do?
The Placeholder Event is an event that is added as a temporary event on the canvas that can be replaced by another event at a later point. It does not require configuration and no action is performed by this event on the K2 server. The Placeholder Event can be used as an executable code module that runs on the K2 Server. If code exists in the Placeholder Event it is executed. If no code exists in the event, no action is performed and the workflow proceeds.
Why Use the Placeholder Event Wizard?
The Placeholder Event is designed to help you design a process quickly, inserting placeholders where you know something needs to be done but you do not have the details yet to configure an actual event. If you want to add some code to the event, right-click it to edit the code (in Visual Studio only). If you're using K2 Studio, you can include the Placeholder Event in your design which can later be updated and code added to it by a developer using K2 Designer for Visual Studio.
The General Properties page captures the details for the Placeholder Event.
The Placeholder Event can be customized using the Event Item menu item to access the code in the Code Module window
Field | Description | Sample Value |
---|---|---|
Name | The name of the Placeholder Event is provided in the Name field. The name displays in the activity on the design canvas and can be used to better describe and organize the workflow. | Specify a name for the Placeholder Event in the text box. |
Description | Text is entered to describe the Placeholder Event and the role it performs. | Specify text to describe the Placeholder Event. |
Metadata | This option enables you to add metadata to the Placeholder Event | Specify the required metadata |
Priority | Click on the drop down box to select a priority for the Placeholder Event | Set the priority for the activity to identify it's urgency |
Run As | The Placeholder Event can be run as the K2 Server Service Account or an account can be specified for the Placeholder Event to run as. | Click on Change, select Specific Credentials and provide a username and password. Select the security label and click OK. |
Expected Duration | The expected duration is the minimum time allocated to the Placeholder Event so that it can execute. | Setting an expected duration for the Placeholder Event gives workflow users some guidance on how long the event should take |
When clicking on the Change button (next to Run As:), the Run with Specific Credentials dialog opens.
You can edit the Placeholder Event, such as adding code to it, by following these steps:
- Move the mouse pointer to the Placeholder Event icon on the Default Activity
- Right click on the icon:
- Navigate to Event Item on the displayed menu.
- The Code Editor window opens with default code:
- Add any additional custom code here
The code can only be edited in K2 for Visual Studio.