AnsweredAssumed Answered

Custom Service Tasks' name

Question asked by racadent on Dec 6, 2012
Latest reply on Dec 31, 2012 by racadent
We are using Custom Java Service Tasks in eclipse designer as described here:

http://activiti.org/userguide/#eclipseDesignerCustomizingPalette

What we want to achieve is that the name of the "shape" depends on task's field and user input.

So, now you can set the name if you override superclass method:

  
  @Property(type = PropertyType.TEXT, displayName = "Account Number", required = true)
  @Help(displayHelpShort = "Provide an account number", displayHelpLong = HELP_ACCOUNT_NUMBER_LONG)
  private String accountNumber;

  @Override
  public String getName() {
    return "Money node";
  }


but what we want is that initial name is accountNumber and if user inputs some value in the accountNumber field, the shape will automatically change its name to that value.

Something like this:


  @Property(type = PropertyType.TEXT, displayName = "Account Number", required = true)
  @Help(displayHelpShort = "Provide an account number", displayHelpLong = HELP_ACCOUNT_NUMBER_LONG)
  private String accountNumber;

  @Override
  public String getName() {
    return accountNumber; ///????
  }

Outcomes