Skip to content

Commit fa14db5

Browse files
committed
javadoc
1 parent 6ed6d70 commit fa14db5

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

dsf-bpe/dsf-bpe-process-api-v2/src/main/java/dev/dsf/bpe/v2/service/TargetProvider.java

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
import org.hl7.fhir.r4.model.Organization;
99
import org.hl7.fhir.r4.model.OrganizationAffiliation;
1010

11+
import dev.dsf.bpe.v2.constants.BpmnExecutionVariables;
1112
import dev.dsf.bpe.v2.constants.CodeSystems.OrganizationRole;
1213
import dev.dsf.bpe.v2.constants.NamingSystems.OrganizationIdentifier;
14+
import dev.dsf.bpe.v2.variables.Target;
1315
import dev.dsf.bpe.v2.variables.Targets;
1416

1517
public interface TargetProvider
@@ -31,8 +33,31 @@ interface Predicate
3133
boolean test(OrganizationAffiliation affiliation, Organization member, Endpoint endpoint);
3234
}
3335

36+
/**
37+
* <i>A <b>correlationKey</b> should be used if return messages i.e. Task resources from multiple organizations
38+
* with the same message-name are expected in a following multi instance message receive task or intermediate
39+
* message catch event in a multi instance subprocess.<br>
40+
* Note: The correlationKey needs to be set as a {@link BpmnExecutionVariables#CORRELATION_KEY} variable in the
41+
* message receive task or intermediate message catch event of a subprocess before incoming messages i.e. Task
42+
* resources can be correlated. Within a BPMN file this can be accomplished by setting an input variable with
43+
* name: {@link BpmnExecutionVariables#CORRELATION_KEY}, type:</i> <code>string or expression</code><i>, and
44+
* value: </i><code>${target.correlationKey}</code>.
45+
* <p>
46+
* <i>A <b>correlationKey</b> should also be used when sending a message i.e. Task resource back to an
47+
* organization waiting for multiple returns.</i>
48+
*
49+
* @return {@link Targets} including correlation keys
50+
* @see Target#getCorrelationKey()
51+
*/
3452
Targets withCorrelationKey();
3553

54+
/**
55+
* <i>{@link Targets} without correlation key can be used when sending out multiple messages without expecting
56+
* replies.</i>
57+
*
58+
* @return {@link Targets} without correlation keys
59+
* @see Target#getCorrelationKey()
60+
*/
3661
Targets withoutCorrelationKey();
3762

3863
/**
@@ -46,16 +71,40 @@ interface Predicate
4671
Builder filter(Predicate predicate);
4772
}
4873

74+
/**
75+
* @param parentOrganizationIdentifier
76+
* not <code>null</code>
77+
* @return {@link Targets} builder for all active members of the given parent organization
78+
*/
4979
Builder create(Identifier parentOrganizationIdentifier);
5080

81+
/**
82+
* @param parentOrganizationIdentifierValue
83+
* not <code>null</code>
84+
* @return {@link Targets} builder for all active members of the given parent organization
85+
*/
5186
default Builder create(String parentOrganizationIdentifierValue)
5287
{
5388
return create(parentOrganizationIdentifierValue == null ? null
5489
: OrganizationIdentifier.withValue(parentOrganizationIdentifierValue));
5590
}
5691

92+
/**
93+
* @param parentOrganizationIdentifier
94+
* not <code>null</code>
95+
* @param memberOrganizationRole
96+
* not <code>null</code>
97+
* @return {@link Targets} builder for all active members of the given parent organization with the given role
98+
*/
5799
Builder create(Identifier parentOrganizationIdentifier, Coding memberOrganizationRole);
58100

101+
/**
102+
* @param parentOrganizationIdentifierValue
103+
* not <code>null</code>
104+
* @param memberOrganizationRoleCode
105+
* not <code>null</code>
106+
* @return {@link Targets} builder for all active members of the given parent organization with the given role
107+
*/
59108
default Builder create(String parentOrganizationIdentifierValue, String memberOrganizationRoleCode)
60109
{
61110
return create(
@@ -64,9 +113,29 @@ default Builder create(String parentOrganizationIdentifierValue, String memberOr
64113
memberOrganizationRoleCode == null ? null : OrganizationRole.withCode(memberOrganizationRoleCode));
65114
}
66115

116+
/**
117+
* @param parentOrganizationIdentifier
118+
* not <code>null</code>
119+
* @param memberOrganizationRole
120+
* not <code>null</code>
121+
* @param memberOrganizationIdentifier
122+
* not <code>null</code>, array <code>null</code> values will be ignored
123+
* @return {@link Targets} builder for all active members of the given parent organization with the given role,
124+
* filtered by the given member organization
125+
*/
67126
Builder create(Identifier parentOrganizationIdentifier, Coding memberOrganizationRole,
68127
Identifier... memberOrganizationIdentifier);
69128

129+
/**
130+
* @param parentOrganizationIdentifierValue
131+
* not <code>null</code>
132+
* @param memberOrganizationRoleCode
133+
* not <code>null</code>
134+
* @param memberOrganizationIdentifierValue
135+
* not <code>null</code>, array <code>null</code> values will be ignored
136+
* @return {@link Targets} builder for all active members of the given parent organization with the given role,
137+
* filtered by the given member organization
138+
*/
70139
default Builder create(String parentOrganizationIdentifierValue, String memberOrganizationRoleCode,
71140
String... memberOrganizationIdentifierValue)
72141
{

0 commit comments

Comments
 (0)