Creating custom workflow transition logic