Executing Clone Object activity within single entity

Hi All,  I have created a ‘Clone’ button in my project and have linked it to a microflow with ‘Clone Object’ activity. What I want to achieve is create a clone of an existing ‘Course’ object, so that the users don’t have to refill all the course details for a similar new course. The cloned course should be rendered below the original course. Effectively, this is cloning of the object within the same entity ‘Course’.  I am using the ‘Clone Object’ Java action from Community Commons. But could someone please share how the microflow should look like? Right now it’s –                      ‘Start event →  clone object activity ( source and target both being ‘Course’ entity ) → End event’ I assume this is not good enough, and not sure how to proceed.  Please advice.      
1 answers

Looks good to me, why do you assume it is not good enough? Did you test and it is not working? Pleae note that you need to commit the clone target in the microflow, this is not done in the Java action. If you need to clone the associations to other objects (e.g. to users who participate in the course), you need to set “includeAssociations” to true. This will NOT clone the users (or any other associated records), but only the references.