cancel
Showing results for 
Search instead for 
Did you mean: 

How to add content to Field extension (Class Field) stencilset

midiman
Champ in-the-making
Champ in-the-making

Hello,

Trying to work out how to add key/value pair properties to the stencilset.json for 'Class Fields'.

Basically, so that when a user drags a ServiceTask into the canvas, the Class Fields form is prepopulated with some values from the stencilset json

[This is the form with 'Name' 'Implementation' on the left; with String value, String and Expression textfields on the right]

I've tried just about every combintation of json I can think of, and I can't get it to pre-populate the form.

This is the area of the stencilset.json I'm tryng to prepopulate:

{
    "name" : "search_servicetaskfieldspackage",
    "properties" : [ {
      "id" : "servicetaskfields",
      "type" : "Complex",
      "title" : "Class  fields",
      "value" : "",  
      "complexItems" : [ {  
        "id" : "servicetask_field_name",  
        "name" : "Name",  
        "type" : "String",  
        "value" : "can I get some values into this",  
        "width" : 200,  
        "optional" : false  
      }, {  
        "id" : "servicetask_field_value",  
        "name" : "String value",  
        "type" : "String",  
        "value" : "",  
        "width" : 200,  
        "optional" : false  
      }, {  
        "id" : "servicetask_field_expression",  
        "name" : "Expression",  
        "type" : "String",  
        "value" : "",  
        "width" : 200,  
        "optional" : false  
      } ],
      "description" : "Search parameters",
      "popular" : true
    } ]
  }

Maybe I need to add some special key names?

Any help on how to do this would much appreciated!

Many thanks

1 ACCEPTED ANSWER

bassam_al-saror
Star Collaborator
Star Collaborator

Hi midiman _,

This is how it worked for me.

{

    "name" : "servicetaskfieldspackage",

    "properties" : [ {

      "id" : "servicetaskfields",

      "type" : "Complex",

      "title" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.TITLE",

      "value" : {"fields":[{"name":"fieldName","implementation":"nana","stringValue":"nana","expression":"","string":""}]},

      "description" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.DESCRIPTION",

      "popular" : true

    } ]

  }

Hope that helps.

View answer in original post

4 REPLIES 4

midiman
Champ in-the-making
Champ in-the-making

Anyone? If anyone has an idea how to do this, any help is much appreciated! Thanks

midiman
Champ in-the-making
Champ in-the-making

bump.

Wow, maybe i'm the only one whose tried to add content to class fields?

Is there anyone out there that could help me please??

Thanks

bassam_al-saror
Star Collaborator
Star Collaborator

Hi midiman _,

This is how it worked for me.

{

    "name" : "servicetaskfieldspackage",

    "properties" : [ {

      "id" : "servicetaskfields",

      "type" : "Complex",

      "title" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.TITLE",

      "value" : {"fields":[{"name":"fieldName","implementation":"nana","stringValue":"nana","expression":"","string":""}]},

      "description" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.DESCRIPTION",

      "popular" : true

    } ]

  }

Hope that helps.

Hi @balsarori

You are a star! Works a treat. Thank you so much for helping me out!!

Peter (alias @00155837364765867)