You are using the pullitem() command incorrectly. That command is designed to be used within the Pull Strategy field.
Your object is not even set to Pull. You don't have the Pull checkbox checked on the Flow tab.
The behavior of that command is undefined in how you are using it.
The reason it seems to "work" when you pass 0 is because the upstream item's "sendto" port value is set to 0. The queue's Send to Port returned an invalid port number so that the item wouldn't be released. That sets the flowitem's "sendto" port value to 0. So when you try to pull using port 0, it sends it. When you try to pull it using port 1, it knows that 1 isn't the port it was sent to and doesn't send it.
You should not be calling pullitem() when you aren't using Pull logic.
If you aren't using ports to control moving the item, disconnect your ports and don't use them. Move the item with moveobject(), the Move Object activity, or the task sequence activities.
Alternatively, if you do want to use ports, you could use releaseitem() to release the item through a specific port.
Phil BoBo
Sr. Manager, Software Development