close block when workflow is completed
Merge pull request #4979 from ticoann/set_close_block_with_complete

close block when workflow is completed, merge for the integration test