Stencil value not getting stored

cancel
Showing results for 
Search instead for 
Did you mean: 
amruta_w
Senior Member

Stencil value not getting stored

Jump to solution

Hello,

I have created simple stencil with text box for an example. here i am facing some problem like if i have entered any value for the stencil text box the value is not getting stored in database, after completing of the task that value will not be present.

Here I have attached the my app, kindly anyone help me out in this regard.

Thanks

Amruta 

1 Solution

Accepted Solutions
cjose
Senior Member II

Re: Stencil value not getting stored

Jump to solution

Checkout this example activiti-examples/stencil-samples/simple-text-input-stencil at master · cijujoseph/activiti-examples... , especially the controller code which does things like onFormRender and others.. It is an app zip and the stencil gets imported along with the app if you import my example app.

View solution in original post

11 Replies
hari
Established Member

Re: Stencil value not getting stored

Jump to solution

I tested your process and I could see that the variables are saved as expected. My guess is that you are looking into act_ru_variables. When the process completes, your variables will be present in act_hi_varinst. 

amruta_w
Senior Member

Re: Stencil value not getting stored

Jump to solution

‌ but for me it is not working, the textbox will be blank.

hari
Established Member

Re: Stencil value not getting stored

Jump to solution

Hi, 

Your process has two user tasks. Below are the screenshots of the completed process at my end. 

User Task 1

The reason why your 1st text box is empty is because you are refering it to a variable called label. Where as your second one is referred with a variable name "name". 

User Task 2

amruta_w
Senior Member

Re: Stencil value not getting stored

Jump to solution

the Name text box is APS default textbox but mine is label textbox, see in your screen shot also not saved

hari
Established Member

Re: Stencil value not getting stored

Jump to solution

I can see things working as expected. I think you should look at your own form designs and the way you want them. The reason why it is empty is because we did not give any value to it. 

amruta_w
Senior Member

Re: Stencil value not getting stored

Jump to solution

‌ you fill it and check, then you may address where i am facing the problem.

hari
Established Member

Re: Stencil value not getting stored

Jump to solution

I get you now. Yes it was not saved. 

hari
Established Member

Re: Stencil value not getting stored

Jump to solution

There was a blog witten by Ciju Joseph‌ on Stencils here https://community.alfresco.com/community/bpm/blog/2017/05/01/form-stencil-examples-alfresco-process-... . I can see an example of a simple form stencil which I can see as working as per our context here (Its persisting the data of the field) . The only difference is in the Form runtime template. 

‌ can you please help us understand a bit more on the form runtime template ? 

amruta_w
Senior Member

Re: Stencil value not getting stored

Jump to solution

Yeah those examples are working, it worked for me too..

A RUNTIME template means after you publish the process whats the appearance and you need to write angular 1 code according to the requirement. EDITOR template means at the design time how it should appear. You can go through the example more.