-
Notifications
You must be signed in to change notification settings - Fork 374
Closed
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requestedstale
Description
Hello,
I have the following scenario:
@on(Action.RequestStartTransaction)
async def on_request_start_transaction(
self,
*args,
**kwargs
) -> call_result.RequestStartTransactionPayload:
response: call_result.RequestStartTransactionPayload = (
await TransactionHandler.handle_on_request_start_transaction(**kwargs)
)
# at this point, the response can be accepted
# or it can be rejected
return response
@after(Action.RequestStartTransaction)
async def after_request_start_transaction(
self,
*args,
**kwargs
) -> call_result.TransactionEventPayload:
# at this point, I would like to run this method conditionally,
# only if the response sent back to the CSMS was accepted
# if it was rejected, I do not want to run this method
return await TransactionHandler.handle_after_request_start_transaction(**kwargs)Looking at charge_point.py, it looks like it is the payload from the initial call which is passed into the @after function. What would you think of also passing through the response of the call so that it can be used for further processing?
I have a workaround by using a temp variable, but thought it could be a nice feature of the library so posting here.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requestedstale