Merge pull request #267 from sartography/get-study-associates-validation-242
The `do_task_validate_only` method in the `get_study_associates` scri…
This commit is contained in:
commit
6ab98c1dee
|
@ -19,8 +19,11 @@ example : get_study_associates() => [{'uid':'sbp3ey','role':'Unicorn Herder', 's
|
|||
"""
|
||||
|
||||
def do_task_validate_only(self, task, study_id, workflow_id, *args, **kwargs):
|
||||
return True
|
||||
|
||||
study_associates = [
|
||||
{'uid': 'dhf8r', 'role': 'Chief Bee Keeper', 'send_email': True, 'access': True},
|
||||
{'uid': 'lb3dp', 'role': 'Chief Cat Herder', 'send_email': True, 'access': True}
|
||||
]
|
||||
return study_associates
|
||||
|
||||
def do_task(self, task, study_id, workflow_id, *args, **kwargs):
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0kmksnn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0kmksnn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.5.0">
|
||||
<bpmn:process id="Process_0exnnpv" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>SequenceFlow_1nfe5m9</bpmn:outgoing>
|
||||
|
@ -30,7 +30,10 @@ out4 = get_study_associate('lb3dp')</bpmn:script>
|
|||
<bpmn:scriptTask id="Activity_0run091" name="setval - 2">
|
||||
<bpmn:incoming>Flow_14n3ixy</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1vlh6s0</bpmn:outgoing>
|
||||
<bpmn:script>update_study_associates([{'uid':'lb3dp','role':'SuperGal','send_email':False,'access':True}])</bpmn:script>
|
||||
<bpmn:script>uids = []
|
||||
for assoc in out:
|
||||
uids.append(assoc['uid'])
|
||||
update_study_associates([{'uid':'lb3dp','role':'SuperGal','send_email':False,'access':True}])</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_1vlh6s0" sourceRef="Activity_0run091" targetRef="Activity_0d8iftx" />
|
||||
<bpmn:scriptTask id="Activity_14td33q" name="getval">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from tests.base_test import BaseTest
|
||||
import json
|
||||
from unittest.mock import patch
|
||||
import flask
|
||||
|
||||
from crc.api.common import ApiError
|
||||
from crc.services.user_service import UserService
|
||||
from tests.base_test import BaseTest
|
||||
|
||||
from crc import session, app
|
||||
from crc.models.study import StudyModel
|
||||
|
|
Loading…
Reference in New Issue