Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

i want to interact both from the material frontend and from python code with my workflow, in particular with a View. The workflow works properly with the material frontend, but i have some problem with programmatically interaction.

I am able to assign the view to an user

Task.objects.filter(id=self.kwargs['task_id'])[0].activate().assign(self.request.user)

but i cannot go ahead with the view.

The view is defined in the workflow like the following:

reporting = (
        flow.View(
            viewsets.Reporting,
            task_description='Reporting'
        ).Permission(
            auto_create=True
        ).Next(this.check_operator_accept)
    )

The model to which the view refers has 2 fields:

 operator_report = CharField(max_length=150)
 operator_accept = BooleanField(default=False)

How can i set those fields and go ahead with the workflow steps? Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
358 views
Welcome To Ask or Share your Answers For Others

1 Answer

Django Views are suited to handle user HTTP request.

To represent programming task, that would be called from code use flow.Function


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...