Skip to content

Commit 6f1ffd6

Browse files
Fix comments for javadocs (#197)
1 parent cdeb5e1 commit 6f1ffd6

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/main/java/io/iworkflow/core/ObjectWorkflow.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ default List<CommunicationMethodDef> getCommunicationSchema() {
7373
* Define the workflowType of this workflow definition. By default(when return empty string), it's the simple name of the workflow instance,
7474
* which should be the case for most scenarios.
7575
* <p>
76-
* In case of dynamic workflow implementation, return customized values based on constructor input.
76+
* Implement this to provide a different workflowType than default to avoid breaking changes when changing workflow class name.
77+
* However, {@link Client} must then use String to provide workflow type to start workflows.
78+
*
7779
* @return the workflow type
7880
*/
7981
default String getWorkflowType() {

src/main/java/io/iworkflow/core/WorkflowState.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public interface WorkflowState<I> {
2929
* @param input the state input which is deserialized by {@link ObjectEncoder} with {@link #getInputType}
3030
* @param persistence persistence API for 1) data attributes, 2) search attributes and 3) stateExecutionLocals 4) recordEvent
3131
* DataAttributes and SearchAttributes are defined by {@link ObjectWorkflow} interface.
32-
* StateExecutionLocals are for passing data within the state execution from this start API to {@link #execute} API
32+
* StateExecutionLocals are for passing data within the state execution from this waitUntil API to {@link #execute} API
3333
* RecordEvent is for storing some tracking info(e.g. RPC call input/output) when executing the API.
34-
* Note that any write API will be recorded to server after the whole start API response is accepted.
34+
* Note that any write API will be recorded to server after the whole waitUntil API response is accepted by server.
3535
* @param communication communication API, right now only for publishing value to InternalChannel
36-
* Note that any write API will be recorded to server after the whole start API response is accepted.
36+
* Note that any write API will be recorded to server after the whole waitUntil API response is accepted by server.
3737
* @return the requested commands for this step
3838
*/
3939
default CommandRequest waitUntil(
@@ -49,18 +49,18 @@ default CommandRequest waitUntil(
4949

5050
/**
5151
* Implement this method to execute the state business, when requested commands are ready if {@link #waitUntil} is implemented
52-
* If {@link #waitUntil} is not implemented, the state will invoke this API directly
52+
* If {@link #waitUntil} is not implemented, the state will invoke this execute API directly
5353
*
5454
* @param context the context info of this API invocation, like workflow start time, workflowId, etc
5555
* @param input the state input which is deserialized by {@link ObjectEncoder} with {@link #getInputType}
5656
* @param commandResults the results of the command that executed by {@link #waitUntil}
5757
* @param persistence persistence API for 1) data attributes, 2) search attributes and 3) stateExecutionLocals 4) recordEvent
5858
* DataAttributes and SearchAttributes are defined by {@link ObjectWorkflow} interface.
59-
* StateExecutionLocals are for passing data within the state execution from this start API to {@link #execute} API
59+
* StateExecutionLocals are for passing data within the state execution from this API to {@link #execute} API
6060
* RecordEvent is for storing some tracking info(e.g. RPC call input/output) when executing the API.
61-
* Note that the write API will be recorded to server after the whole start API response is accepted.
61+
* Note that the write API will be recorded to server after the whole execute API response is accepted by server.
6262
* @param communication communication API, right now only for publishing value to InternalChannel
63-
* Note that the write API will be recorded to server after the whole decide API response is accepted.
63+
* Note that the write API will be recorded to server after the whole execute API response is accepted by server.
6464
* @return the decision of what to do next(e.g. transition to next states)
6565
*/
6666
StateDecision execute(
@@ -82,9 +82,10 @@ default String getStateId() {
8282
}
8383

8484
/**
85-
* Optional configuration to adjust the state behaviors. Default values:
85+
* Optional configuration to adjust the state behaviors. Default values if not set:
86+
* - waitUntilApiFailurePolicy: FAIL_WORKFLOW_ON_FAILURE
8687
* - PersistenceLoadingPolicy for dataAttributes/searchAttributes: LOAD_ALL_WITHOUT_LOCKING ,
87-
* - start/decide API:
88+
* - waitUntil/execute API:
8889
* - timeout: 30s
8990
* - retryPolicy:
9091
* - InitialIntervalSeconds: 1

0 commit comments

Comments
 (0)