Dynamic content for custom service task's property tab

cancel
Showing results for 
Search instead for 
Did you mean: 
junhong_liang
Member II

Dynamic content for custom service task's property tab

Hi everyone,

I just got started with Activiti and this is my first post. So I was following the activiti user guide to build a custom service task here:

Activiti User Guide - Extending Activiti Designer  

I understand that by using Property Type I can customize the property tab in my custom service task. However, the guide only shows how to set the property tab with static values. What I really want to achieve is to have a combobox in my custom service task's property tab, that is similar to the one in Message Intermediate Catch Event, which shows the available messages in the current BPMN model. Is it possible to do that? If yes, could you please briefly introduce how to do that?

Thank you very much!

4 Replies
gdharley
Intermediate

Re: Dynamic content for custom service task's property tab

The AcmeMoneyTask example demonstrates how to setup a Combo box property type.

You can find the code on github here:

Activiti-Designer/AcmeMoneyTask.java at master · Activiti/Activiti-Designer · GitHub 

Cheers,

Greg

junhong_liang
Member II

Re: Dynamic content for custom service task's property tab

Hi Greg,

thank you for your reply! If I am not mistaken, the example shows how to make combo box out of static values (values you defined before compile time). What I am looking for is to retrieve BPMN model information in runtime and populate the combo box with those information (for example, the combo box in Message Intermediate Catch Event, which only provides options for messages available in the BPMN model at the moment). How can I do that?

Best regards,

Junhong

gdharley
Intermediate

Re: Dynamic content for custom service task's property tab

Ummm, You want to use data from the runtime process instance in you design time process model.

Sounds a lot like a chicken and egg problem here.

Greg

junhong_liang
Member II

Re: Dynamic content for custom service task's property tab

Sorry, Greg, I may have confused you by saying the word "rumtime".

I'll show you an example. Let's say I am drawing the diagram with Activiti Designer now. I have defined Message1, Message2 and Message3 in my BPMN model. Now if I add my custom service task, I want it to have a combo box, which shows the three options: Message1, Message2 and Message3

Did I clarify the question a little better?

Junhong