Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BPMNModelExtension #254

Closed
rsoika opened this issue May 23, 2023 · 0 comments
Closed

BPMNModelExtension #254

rsoika opened this issue May 23, 2023 · 0 comments
Labels
feature GLSP Core Good for newcomers
Milestone

Comments

@rsoika
Copy link
Member

rsoika commented May 23, 2023

Introduce a new Interface BPMNModelExtension that allows an adopter to react on the load and save events of Open-BPMN

public interface BPMNModelExtension {

    /**
     * Called after the BPMNModel was loaded the first time.
     * 
     * An injected ModelState already holds the generated GModel Tree.
     * 
     * @param model - the BPMNModel
     */
    void onLoad(final BPMNModel model);

    /**
     * Called before the BPMNModel is stored to disk.
     * 
     * @param model - the BPMNModel
     */
    void onSave(final BPMNModel model);

}

This extension allows an adopter to react on a new loaded model to extend the model or load external content. In the onSave method an adapter can externalize content or change the model before it is finally written to disk.

With this new concept the recently developed resolveFileLinksOnLoad #246 feature can be realized in a BPMNModelExtension which is a much more clean way to implement such a kind of behaviour.

See also this discussion: #253

@rsoika rsoika added the feature label May 23, 2023
@rsoika rsoika added this to the 1.0.1 milestone May 23, 2023
@rsoika rsoika added the GLSP Core Good for newcomers label May 23, 2023
rsoika added a commit that referenced this issue May 24, 2023
@rsoika rsoika closed this as completed Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature GLSP Core Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant