Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
You are getting this error.
context attribute RequestType does not exist in the activity context - adding new attributes to activity context is not allowed
Probably you tried to map a form element to a non-existent workflow variable.
Hi there,
Probably you have Form 2 as subform in Form 1. Therefore, in your subform, configure the
I have the following understanding of the Joget Table Structure that we create through our forms:
a) Joget has its own attribute “ID” in each table that acts as a Primary Key.
b) We can create our own attribute in a table and assign it with a counter to create a unique value.
In my case, I am using 2 tables, i.e. One for Routes and other one for Route Notes:
Table 1 - AAS_Routes
< -- System Generated-- > < ------------------------------------User Created--------------------------------------- >
ID (Primary Key) | Unique_Route_ID | QA_Date | Prod_Date |
ProcessID1 | ID_000001 |
|
|
ProcessID2 | ID_000002 |
|
|
Table 2 - Route_Notes
< ---System Generated-- > < ------------------------------------User Created----------------------------------------------------------------------- >
ID | Route_ID (Foreign_Key) | UserId | Role | Notes |
NoteID1 | ProcessID1 |
|
|
|
NoteID2 | ProcessID1 |
|
|
|
. | . |
|
|
|
. | . |
|
|
|
NoteID5 | ProcessID2 |
|
|
|
NoteID6 | ProcessID2 |
|
|
|
Need Help to Understand following functionality:
a) The basic functionality in Joget doesn’t allow me to reference the attribute “Unique_Route_ID” from Table 1 to the attribute “Route_ID” in Table 2.
It only allows the Primary Key “ID” from Table 1 to get referenced to “Route_ID” in Table 2.
Could you please suggest how to code my Load and Store Binder in order to reference my Unique_Route_ID from Table 1 to the Foreign Key "Route_ID" in Table 2?
Hi Hugo, Thanks for your help !!! However, my scenario is a bit different and is explained in the Note below with Table Diagram.
In table 1 form, instead of using "Unique_Route_ID" as the id, use "id" as the ID. You can override the automatically generated primary key with your own own (make sure that it is unique). You don't need to design such that you have 2 primary key identifier in table 1.
Hi Hugo, Thanks for your suggestion !!! I can create my own attribute with the name "id" and can also generate a Unique value for it. In the form table, one row is created with the value for attribute "id: as "ID-0000000001". This value keeps on increasing by 1 for each row created in the table. However, the workflow is still creating it's own primary key value within the process as "105_AASOnboarding_OnboardingProcess". This use to be the value for attribute "id" generated by the system before implementing your suggestion. This value "105_AASOnboarding_OnboardingProcess" is not saved anywhere in the form table for a particular row. Therefore, in nutshell I would say I can create my own unique values for the attribute "id" but this has resulted in datalists not populating with the form attribute values on the Userview. The datalists are not showing any row on the Userview. It indicates that the unique value generated by me for the attribute "id" is not passed by the Workflow to populate datalists. Following error is seen in the logs: ERROR 17 Jun 2015 15:43:14 Shark - Activity[Process Id=105_AASOnboarding_OnboardingProcess, Id=114_105_AASOnboarding_OnboardingProcess_fillForm, ba=null, ActDefId=fillForm] - failed to set the activity result ERROR 17 Jun 2015 15:43:14 org.joget.workflow.model.service.WorkflowManagerImpl - org.enhydra.shark.api.client.wfmodel.UpdateNotAllowed: Activity [Process Id=105_AASOnboarding_OnboardingProcess, Id=114_105_AASOnboarding_OnboardingProcess_fillForm, ba=null, ActDefId=fillForm] - context attribute RequestType does not exist in the activity context - adding new attributes to activity context is not allowed org.enhydra.shark.api.client.wfmodel.UpdateNotAllowed: Activity [Process Id=105_AASOnboarding_OnboardingProcess, Id=114_105_AASOnboarding_OnboardingProcess_fillForm, ba=null, ActDefId=fillForm] - context attribute RequestType does not exist in the activity context - adding new attributes to activity context is not allowed at org.enhydra.shark.WfActivityImpl.setProcessContext(WfActivityImpl.java:531) at org.enhydra.shark.WfActivityImpl.set_result(WfActivityImpl.java:339) at org.enhydra.shark.WfActivityWrapper.set_result(WfActivityWrapper.java:212) at org.joget.workflow.model.service.WorkflowManagerImpl.activityVariable(WorkflowManagerImpl.java:2361) at sun.reflect.GeneratedMethodAccessor1014.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)................................. I think this above error is reported because the Process Id = 105_AASOnboarding_OnboardingProcess generated by workflow is not linked with my own attribute value "id" = "ID-0000000001". Is there anyway that I can force my own primary key "id" value to also become the Process Id of the Workflow?
Here is the scenario:
a) We have 2 Forms: Form1 - Parent Form - Main Form - Form to be used in different process in a single App
Form2 - Child Form - Notes Form - Used to store User Activity on Parent Form
b) Once the Parent Form (Form1) is used in 2 Different process the Primary Key (ID) changes as per normal functionality.
c) Therefore, this changes the Foreign Key reference in the Child Form (Form2) as we loose the User Activity trail or Notes of the previous process.
Could you please suggest how can I write my Store Binder to store the Subform Data (Form2) using my own Unique Attribute generated in the parent form (Form1)?
This will help me to retain the Notes even if the primary key of the parent form changes after using it in 2 or more process.
Thanks !!