1

Is there way to collect remarks for specific task when user submits his task form?

Lets say i have below step to perform approval, where i'm exposing only ìs_approvedfield which will get stored in actual process model. Now along with ìs_approved, i also want to capture remarks for the same task.

approve = (
    flow.View(
        UpdateProcessView,
        fields=["is_approved"],
        task_title="Approve the document"
    ).Permission(
        lambda process: 'core.can_approve_{}'.format(process.process.type)
    ).Next(this.check_approve)
)


Task1 -> Start -> Capture remarks from requester
Task2 -> Verification -> Capture remarks from the guy who performs verification
Task3 -> Approval -> Capture remarks from the guy who approves
Asif
  • 479
  • 2
  • 6
  • 12

1 Answers1

0

There are many ways to do it. Just like in common django application. There is no viewflow specific functionality involved here.

The simplest one, would add comments field to the process model and set `fields=['is_approved', 'comments'] for the update view.

For more complicated cases, you can use your own views and models to store comments.

kmmbvnr
  • 5,863
  • 4
  • 35
  • 44
  • If that's the case, i need to maintain separate model to capture remarks against each task. As you can see my updated question, one process instance may have many task reamrks – Asif Jan 31 '18 at 08:48
  • in that case, you can set custom Flow.task_class, or use separate TaskRemarks model. – kmmbvnr Feb 06 '18 at 09:27