# The scope screening of a journal submission, as a control flow: an activation task
# starts it, a boolean case task branches on "is this in scope?" into exactly two
# deliberation tasks, an action task carries out the yes branch, an abstract merging
# task rejoins them and an ending task closes the flow. Two further individuals are the
# execution side: the editor's screening activity executes the case task, and the
# deliberation state that follows it executes the decision taken. The tasks are
# also sequence:Entity because that is the domain the sequencing properties require.

@prefix agentrole: <http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl#> .
@prefix controlflow: <http://www.ontologydesignpatterns.org/cp/owl/controlflow.owl#> .
@prefix objectrole: <http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#> .
@prefix participation: <http://www.ontologydesignpatterns.org/cp/owl/participation.owl#> .
@prefix sequence: <http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#> .
@prefix taskexecution: <http://www.ontologydesignpatterns.org/cp/owl/taskexecution.owl#> .
@prefix taskrole: <http://www.ontologydesignpatterns.org/cp/owl/taskrole.owl#> .
@prefix ex: <https://w3id.org/ontoboard/example/controlflow#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:StartScreening a owl:NamedIndividual , controlflow:ActivationTask , sequence:Entity ;
    rdfs:label "start screening the submission" ;
    sequence:directlyPrecedes ex:ScreenForScope .

ex:ScreenForScope a owl:NamedIndividual , controlflow:BooleanCaseTask , sequence:Entity ;
    rdfs:label "is the manuscript in scope? - yes or no" ;
    sequence:directlyPrecedes ex:DecideInScope ,
        ex:DecideOutOfScope .

ex:DecideInScope a owl:NamedIndividual , controlflow:DeliberationTask , sequence:Entity ;
    rdfs:label "decide: in scope" ;
    sequence:directlyPrecedes ex:SendToReviewers .

ex:DecideOutOfScope a owl:NamedIndividual , controlflow:DeliberationTask , sequence:Entity ;
    rdfs:label "decide: out of scope" ;
    sequence:directlyPrecedes ex:JoinTheBranches .

ex:SendToReviewers a owl:NamedIndividual , controlflow:ActionTask , sequence:Entity ;
    rdfs:label "send the manuscript to two reviewers" ;
    sequence:directlyPrecedes ex:JoinTheBranches .

ex:JoinTheBranches a owl:NamedIndividual , controlflow:AbstractMergingTask , sequence:Entity ;
    rdfs:label "the two screening branches rejoin here" ;
    sequence:follows ex:ScreenForScope ;
    sequence:directlyPrecedes ex:CloseScreening .

ex:CloseScreening a owl:NamedIndividual , controlflow:EndingTask , sequence:Entity ;
    rdfs:label "screening is over" .

ex:ScreenTheManuscript a owl:NamedIndividual , controlflow:DecisionActivity , sequence:Entity ;
    rdfs:label "the handling editor screens manuscript MS-1042" ;
    taskexecution:executesTask ex:ScreenForScope ;
    participation:hasParticipant ex:ManuscriptMS1042 .

ex:ScopeDecisionTaken a owl:NamedIndividual , controlflow:DeliberationState , sequence:Entity ;
    rdfs:label "the decision reached: in scope" ;
    sequence:follows ex:ScreenTheManuscript ;
    taskexecution:executesTask ex:DecideInScope .

ex:HandlingEditorRole a owl:NamedIndividual , taskrole:Role ;
    rdfs:label "the handling editor's role" ;
    taskrole:hasTask ex:ScreenForScope .

ex:ManuscriptMS1042 a owl:NamedIndividual , participation:Object ;
    rdfs:label "manuscript MS-1042, under submission" .

# Only one direction of each inverse pair is asserted: executesTask/isExecutedIn, hasTask/isTaskOf. A reasoner adds the other.

