Step V

Issue DL as Flow

  • Edit DlProcess.kprocess and insert the below content to create a DrivingLicense flow
//Change the DrivingLicence flow as follows,
task IssueDL {
    input(firstName)
    realizer flow  IssueDL(Issue)
  }

  flow IssueDL {
  document(applicationId:String, firstName:String,lastName:String,
    age:Int,dateIssued:DateTime,licenseNumber:String?
  ) display-id("${firstName} ${lastName}")

  task CollectInfo {
      realizer manual(RTO) distribution(system)
  }
  task MakePayment {
      realizer manual(Applicant) distribution(system)
  }

  task ProcessInfo {
      realizer deferred
  }
  task SendDL {
    output(licenseNumber!)
      realizer auto
  }
  net Issue {
    init-document(applicationId, firstName,lastName,age,dateIssued)
    START out(CollectInfo)
    connector C1 in(CollectInfo) out(MakePayment)
    connector C2 in(MakePayment) out(ProcessInfo)
    END in(SendDL)
  }
}
  • to run the project go to command line
$[drivingLicence] run

Gompa Setup For SubFlow

Need to set up Gompa for sub flow Issue DL

Execute Flow

Now we are ready to add issue Dl as a separate flow,which is an enhancement without altering the existing functionality