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

Can you perfect the example again? #111

Closed
3xxx opened this issue Feb 11, 2019 · 2 comments
Closed

Can you perfect the example again? #111

3xxx opened this issue Feb 11, 2019 · 2 comments
Assignees
Labels

Comments

@3xxx
Copy link

3xxx commented Feb 11, 2019

Thank you very much for the previous example.
Can you perfect the example again?

For example, when I create a new documents, do I create their events at the same time? Or create a new event and apply it to workflow when I clicks the action button?

In the list of documents presented to the user, for each document, is it right to list all possible actions and next states according to transition? When the user clicks on the action button, do I just create a new event and then apply it to workflow?

When I create a new event, it returns DocEventID, but what workflow applyevent needs is an DocEvent. Feel that I do is not correct.

@js-ojus js-ojus self-assigned this Feb 12, 2019
@js-ojus
Copy link
Owner

js-ojus commented Feb 12, 2019

  1. When you create new documents, their events need not be created at the same time. Events should be created and applied in response to user actions (or system events).

  2. Whether you list all possible actions in a list of documents is up to you. In my opinion, the possible actions - for a given user - on a given document, are best made available in the detailed view of that document (not in a document list view).

  3. Yes, when the user clicks on an action button, we can create the corresponding event instance, and apply it to the document's workflow.

  4. With a DocEventID, you can fetch the corresponding event instance using DocEvents.Get (please see

    // Get retrieves a document event from the database, using the given
    onwards).

@3xxx
Copy link
Author

3xxx commented Feb 13, 2019

Thank you for your patient answer, I will continue to try according to your suggestion.

@3xxx 3xxx closed this as completed Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants