WorkflowStepInput - calculation and assignment

I have the following step as part of a work flow which has two integer inputs startFrame and numFrames

                cwl.WorkflowStep(
                    in_=[
                        cwl.WorkflowStepInput(id="startFrame",source="startFrame"),
                        cwl.WorkflowStepInput(id="endFrame",source="startFrame"),
                        cwl.WorkflowStepInput(id="stepFrame",source="startFrame"),

for one of the step, I would like to have endFrame and stepFrame be calculate base on the workflow inputs as it is not a simple source but calculated base on the value of some source. They calculation are simple integer arithmetic.

e.g. I would like endFrame to be numFrames - 1 + startFrame

Cheers

You want to use valueFrom, probably something like

cwl.WorkflowStepInput(id="endFrame",valueFrom="$(inputs.numFrames-1+inputs.startFrame)")