Replies: 16 comments 15 replies
-
i solve by using assign() as your example at userassignment
|
Beta Was this translation helpful? Give feedback.
-
but I would like to higlight the newData override the entire |
Beta Was this translation helpful? Give feedback.
-
This is what is happening in my new release: > let response = await api.engine.start('Vacation Request', { reason: 'I like it', type: 'Vacation' }, user1);
---------------- started -----------data: { reason: 'I like it', type: 'Vacation', requester: 'user1' }
> response = await api.engine.assign({ id: response.id, "items.elementId": 'Request' }, { duration: '10 days' }, {},user1);
---------------- Assigned -----------data: {
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
duration: '10 days'
}
---------------- Trying with user1 -----------
> response = await api.engine.invoke({ id: response.id, "items.elementId": 'Request' }, {duration: '20 days'}, user1);
---------------- Requested -----------data: {
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
duration: '20 days'
} is not overwriting any data, is that what you mean? Thanks |
Beta Was this translation helpful? Give feedback.
-
ah, your sample override your initial data. this enforcement is less appropriate same like #135. Base on my understanding (correct me if i'm wrong), the generic sequence as below:
IMHO, below is important:
in fact, this ideal is not come from my own, historical bpmn engine I use before also isolate data by individual task, and manage variable separately in bpmn. However it too complex and too confusing. I just propose simplified way |
Beta Was this translation helpful? Give feedback.
-
Very interesting... please let me think about this abit ,I am converting it to a conversation |
Beta Was this translation helpful? Give feedback.
-
How does that look: > let response = await api.engine.start('Vacation Request', { reason: 'I like it', type: 'Vacation' }, user1);
data: {
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
_history: {[
{date: somedatehere, user: user1,
data:
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
}
]
}
}
---------------- started -----------data: { reason: 'I like it', type: 'Vacation', requester: 'user1' }
> response = await api.engine.assign({ id: response.id, "items.elementId": 'Request' }, { duration: '10 days' }, {},user1);
---------------- Assigned -----------
data: {
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
duration: '10 days'
_history: {[
{date: somedatehere, user: user1,
data:
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
},
{date: bitlater, user: user1,
data:
duration: '10 days'
}
]
}
}
---------------- Trying with user1 -----------
> response = await api.engine.invoke({ id: response.id, "items.elementId": 'Request' }, {duration: '20 days'}, user1);
---------------- Requested -----------data: {
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
duration: '20 days'
_history: {[
{date: somedatehere, user: user1,
data:
reason: 'I like it',
type: 'Vacation',
requester: 'user1',
},
{date: bitlater, user: user1,
data:
duration: '10 days'
},
{date: daylater, user: user1,
data:
duration: '20 days'
}
]
}
} |
Beta Was this translation helpful? Give feedback.
-
What is the alternative? |
Beta Was this translation helpful? Give feedback.
-
Regarding your no 2 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Are you aware that we support item.vars Are suggesting that invoke should not take data? |
Beta Was this translation helpful? Give feedback.
-
What to do with user input? not sure I understand, can repeat in a different phrasing |
Beta Was this translation helpful? Give feedback.
-
If variable name starts with vars. It Will be placed into vars scripts can validate and move data between this does not solve the problem of who has inputted the data? Another question: should we allow users to input task data on ‘assign’? |
Beta Was this translation helpful? Give feedback.
-
To answer your question; the input variables that start with 'vars' will only be saved in Also keep in mind, that both 'item.vars |
Beta Was this translation helpful? Give feedback.
-
Sorry, not yet implemented, will be in next release.
Thanks
…________________________________
From: Ks Tan ***@***.***>
Sent: Monday, December 4, 2023 9:08 PM
To: bpmnServer/bpmn-server ***@***.***>
Cc: ralphhanna ***@***.***>; Comment ***@***.***>
Subject: Re: [bpmnServer/bpmn-server] Swap assignee/candidateUsers/groups (Discussion #139)
hm.. no it "varssample" still not go in vars and it merged into data:
const response = await this.bpmnServer.engine.invoke({'items.id': taskId, 'items.status':'wait'}, {varssample:"test vars"} );
bugs2.jpg (view on web)<https://github.com/bpmnServer/bpmn-server/assets/1889979/3e1090f1-3bf3-45c2-8dd1-97e37e9850fc>
—
Reply to this email directly, view it on GitHub<#139 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC2XVKGMIV6JQCPYOKORCYTYHZ6ZVAVCNFSM6AAAAABAGLR4VKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONJZGQZTA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
One other option to consider for the above issues for
P.S. Your feedback please? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your valuable feedback, always appreciated, keep it coming.
I agree, managing Input/Output for User Tasks does not make a lot of sense, so rolling back this idea, Thanks. I like what you said about : $(this.data)
or ${this.data}
1 (no quote) as number
"1" (with quote) as string But it breaks older releases ,the old syntax is used for:
|
Beta Was this translation helpful? Give feedback.
-
according #131,
I would like to try up. however there is no documentation for update
item
.Beta Was this translation helpful? Give feedback.
All reactions