10-04-2017 02:00 PM
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
10-12-2017 01:01 PM
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.
10-06-2017 05:03 AM
Anyone? If anyone has an idea how to do this, any help is much appreciated! Thanks
10-08-2017 05:01 PM
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
10-12-2017 01:01 PM
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.
10-12-2017 02:31 PM
Hi @balsarori
You are a star! Works a treat. Thank you so much for helping me out!!
Peter (alias @00155837364765867)
Explore our Alfresco products with the links below. Use labels to filter content by product module.