Implementing workflow using Spring

22,105

Solution 1

Please go through the below tutorial.If you still required more help,i will share my code piece.As i have worked on Spring workflow project couple of months ago.My Project was similar to your requirement.

http://www.studytrails.com/frameworks/spring/spring-web-flow.jsp

http://www.javabeat.net/spring-web-flow-introduction/

Solution 2

Spring announced a new project: Spring Statemachine

Share:
22,105
Pramod Karandikar
Author by

Pramod Karandikar

Updated on August 23, 2020

Comments

  • Pramod Karandikar
    Pramod Karandikar almost 4 years

    We are working on a Spring based web based application where we need to implement workflow. This is how a sample scenario looks like:

    • User fills in the registration form. This request is stored in the database and an admin will be notified.
    • Admin will approve this request and only then this request will actually be processed and can be taken further.
    • There can be one or more than one admins who need to approve the requests based on the type of the activity.
    • There will be hierarchies assigned to different roles.
    • Only the admin can view the options to approve or reject requests. Not everyone. In general, there will be user-type specific activities.

    One way is to design the workflow based on database entries. Each user may be assigned one/more roles and workflow will involve these users.
    Is there anything Spring offers that will suite my requirement? I have gone through this and this Spring documentation but could not understand fully.

  • M. Deinum
    M. Deinum almost 10 years
    Spring Web Flow is not a workflow engine it is for creating screen flows. If you want workflow use something like activiti
  • Pramod Karandikar
    Pramod Karandikar almost 10 years
    @M.Deinum Will check Activiti, but isn't there anything available natively in Spring itself? (only trying not to increase project dependencies)
  • M. Deinum
    M. Deinum almost 10 years
    No, unless you program the whole flow yourself with controllers etc. but nothing in spring that can help you.
  • Pramod Karandikar
    Pramod Karandikar almost 10 years
    @M.Deinum I went through an overview of Activiti. It looks like it has its own front end. Since my requirement is to have the workflow integrated along with other flows of the application, I am not sure of its use to me. Please correct me if I am wrong.
  • M. Deinum
    M. Deinum almost 10 years
    No it doesn't you CAN use the activiti front-end but you don't have to. You can simply use the engine and fire request/events to it.
  • SamwellTarly
    SamwellTarly over 5 years
    It's 2018, this is highly recommended for seamless integration
  • Marco Sulla
    Marco Sulla almost 5 years
    I suggest you Camunda. It's a fork of Activiti, has much more features and, if you trust the developers, is more fast and robust.