How to Specify Activity Colors in the Data Model |
Scroll Previous Topic Top Next Topic More |
If you want to set specific colors for the activities you can add a color-field to the data model. This field will contain one color per activity and can be used in the Process Analyzer or the Process Variants Inspector to define the process steps' colors.
Adding the color-field to the data editor is quite easy, just follow the steps below:
1.You can add the color information by joining the color to the AL_ActivityType - table or directly to the pa_activity_log.
2.Just copy this code snippet into your MPM app and add your activities and colors to the app, if you want to define the colors by hand.
Be aware to add only one color per activity type. But - good for you - it is not necessary to add colors to every activity if you do not want to. Activities without a specific color information will be colored by the extensions-default configuration. |
The code you add to your app can look like this - you can of course use the AL_ActivityTypeID instead of the AL_ActivityType if it is easier for you:
left join([AL_ActivityTypes_$(mvProcessDescription)])
load * inline
[AL_ActivityType, |
Colorcode |
Wait, |
#335c98 |
Take in charge ticket, |
#0066ff |
Closed, |
#059848 |
Insert Ticket, |
#006580 |
Require upgrade, |
#ffce26 |
]; |
|
3.Instead of using an inline table you can of course use another file format where the color-information is stored.
See this example:
Left Join ([AL_ActivityTypes_$(mvProcessDescription)])
Load * Inline [
AL_ActivityType, Colorcode
Wait, #ff0000
];
In this example, the activity "Wait" was colored red. After loading the data, your process variant inspector extension will be colored as you configured.