use status of a task as input to a python script od another component

I have a simple model in visual components: A worker who picks up a part (create task + feed part in work process 1) and drop it on another location (need task on work process 2). Is it possible to check the status of the “pick up” task and hide a component if the aforementioned status is true?

I am able to hide the component with this script

comp = getComponent()
comp.Visible= True

how can I input the task status in the script?

Hi @luigituc

Do you want to hide the component that is being picked by the worker or some other component?

Hi @jouha,

I’d like to hide another component