You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Lukas Funk <Lu...@united-security-providers.ch> on 2018/06/05 16:52:56 UTC

RE: Update userworkflow for existing users

Hi Francesco

Yes we’re using Flowable, exactly because of the reason, that you’re planning it to be the new default for the 2.1 release.

I see your point about updating the workflow which could lead to an inconsistent state for the users.

For our use-case it’s not a very handy approach having to delete all users and create them again.
Therefore I’ve looked into the second option - manually update the flowable tables.
I’ve investigated in this direction, as we can ensure for this update that the workflow states will not change only additional flows will be added.

I managed to update the workflow for existing users by manipulating the database entries. To get it working, I extracted the id_ and version_ value in the table act_re_procdef table in the database and updated then the values rev_ and proc_def_id of all entries in the table act_ru_execution.
I’ve to do further tests if everything is working correctly but on first sight it seems to be ok…

Thanks for clarification how the workflow works.
Regards, Lukas

From: Francesco Chicchiriccò <il...@apache.org>
Sent: Thursday, May 31, 2018 3:24 PM
To: user@syncope.apache.org
Subject: Re: Update userworkflow for existing users

On 29/05/2018 19:31, Lukas Funk wrote:
Hi guys,

We were using the default (flowable-)workflow in our first setup. Now, I’d like to update the workflow, so that I can edit suspended users (which is not possible in the default workflow).

I managed to update the workflow to my needs with the /workflow REST endpoint and it works fine with newly created users. But the already existing users still use the previous workflow.
How can I apply the new workflow to all existing users?

Hi Lukas,
first a question: are you using Flowable with Syncope 2.0? That's nice to hear, as Flowable is not default in 2.0, but became so in 2.1.

Anyway: as you have already found, each user is bound to the workflow definition available at the time he / she was created.
This is a constraint by Activiti / Flowable, to ensure consistency: what would happen, for example, if you remove in a subsequent definition the state in which an user is located?

Hence, the suggestion is simply to delete the users created under the old definition, and to create them again.

Under some circumstances, however, a manual alignment can be done, but it's an operation that ought to be performed at database level on the Activiti / Flowable tables, which are distinct from Syncope's, even if in the same database.

Regards.


--

Francesco Chicchiriccò



Tirasa - Open Source Excellence

http://www.tirasa.net/



Member at The Apache Software Foundation

Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail

http://home.apache.org/~ilgrosso/