A system for generating an idempotent workflow comprising: a processor to execute processor executable code; a storage device that stores processor executable code, wherein the processor executable code, when executed by the processor, causes the processor to: detect distributed code, wherein the distributed code comprises a number functions in a programming language, wherein the functions can be executed across different computing devices; identify a boundary function in the distributed code; separate the boundary function into a transition function that comprises a transitioning from a local computing device to a remote computing device, a non-idempotent function that modifies parameter values, and a reversion function that terminates a session; store the transition function, the non-idempotent function, and the reversion function in a persistent workflow database, store an input array with the transition function, the non-idempotent function, and the reversion function in the persistent workflow database, wherein the input array comprises a union of output values corresponding to each previously executed function; transform the non-idempotent function into an idempotent function by generating a flag corresponding to the non-idempotent function, wherein the flag indicates if the non-idempotent function has been executed; and combine the transition function, the idempotent function, and the reversion function to form the idempotent workflow using the persistent workflow database for input and output values. a processor to execute processor executable code; a storage device that stores processor executable code, wherein the processor executable code, when executed by the processor, causes the processor to: detect distributed code, wherein the distributed code comprises a number functions in a programming language, wherein the functions can be executed across different computing devices; identify a boundary function in the distributed code; separate the boundary function into a transition function that comprises a transitioning from a local computing device to a remote computing device, a non-idempotent function that modifies parameter values, and a reversion function that terminates a session; store the transition function, the non-idempotent function, and the reversion function in a persistent workflow database, store an input array with the transition function, the non-idempotent function, and the reversion function in the persistent workflow database, wherein the input array comprises a union of output values corresponding to each previously executed function; transform the non-idempotent function into an idempotent function by generating a flag corresponding to the non-idempotent function, wherein the flag indicates if the non-idempotent function has been executed; and combine the transition function, the idempotent function, and the reversion function to form the idempotent workflow using the persistent workflow database for input and output values. detect distributed code, wherein the distributed code comprises a number functions in a programming language, wherein the functions can be executed across different computing devices; identify a boundary function in the distributed code; separate the boundary function into a transition function that comprises a transitioning from a local computing device to a remote computing device, a non-idempotent function that modifies parameter values, and a reversion function that terminates a session; store the transition function, the non-idempotent function, and the reversion function in a persistent workflow database, store an input array with the transition function, the non-idempotent function, and the reversion function in the persistent workflow database, wherein the input array comprises a union of output values corresponding to each previously executed function; transform the non-idempotent function into an idempotent function by generating a flag corresponding to the non-idempotent function, wherein the flag indicates if the non-idempotent function has been executed; and combine the transition function, the idempotent function, and the reversion function to form the idempotent workflow using the persistent workflow database for input and output values.